[ 버전정보 ]
- Httpd 2.4
- Php 7.3
- mariaDB 5.5
[ EC2에 APM설치 ]
httpd2.4 설치
#sudo yum install httpd
#httpd -v
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Apache httpd vhost 설정
#sudo vi /etc/httpd/conf/httpd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Listen 8080 (추가)
.....
(VirtualHost 추가)
<VirtualHost *:80>
ServerName servername:80
ServerAdmin root@example.com
DocumentRoot "/var/www/html/server1"
CustomLog "logs/access_log" combined
ErrorLog "logs/error_log"
<Directory "/var/www/html/server1">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:8080>
ServerName servername:8080
ServerAdmin root@example.com
DocumentRoot "/var/www/html/server2"
CustomLog "logs/access_log" combined
ErrorLog "logs/error_log"
<Directory "/var/www/html/server2">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
.....
#sudo systemctl restart httpd
php73 설치
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
remi repository를 yum 에 추가 한다.
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh epel-release-latest-7.noarch.rpm
# wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# rpm -Uvh remi-release-7.rpm
# yum install -y yum-utils
# yum-config-manager --enable remi-php73
기존의 설치된 PHP 패키지를 확인하여 잘못된 패키지가 삭제되지 않도록 한다.
# yum list installed | cut -d " " -f 1 | grep php
기존 설치된 PHP를 제거. (php5)
#yum remove -y `yum list installed | cut -d " " -f 1 | grep php`
php 패키지 설치. php-common 외의 패키지는 자신의 상황에 맞게 조정해서 설치한다.
# yum install -y php-common php-fpm php-cli \
php-process \
php-opcache php-pecl-apcu \
php-mysqlnd php-pdo \
php-gd \
php-mbstring php-xml \
php-pecl-zip \
php-bcmath
#php -v
PHP 7.3.34
mariadb 설치
#yum install mariadb mariadb-server
#mysql --version
mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1
APM설정파일 경로
/etc/php.ini
/var/lib/php/
/etc/httpd/conf.d/php.conf
/etc/httpd/conf/httpd.conf
명령어
-실행
sudo systemctl start httpd
sudo systemctl start mariadb
-확인
sudo systemctl status httpd
sudo systemctl status mariadb
댓글 없음:
댓글 쓰기