PHP 설치 및 Apache 연동
1. PHP 설치
Webtatic 과 remi repository가 있는데 필요한 모듈이 포함되어 있는 저장소를 선택한다.
// Epel Repository 설치
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
=> # yum install epel-release 으로도 가능.
// Remi Repository
# wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
or
# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
// php 7.2 설치
# yum install php72
php72-php-cli
php72-php-devel
php72-php-mbstring : 다국어 지원 모듈
php72-php-mysqlnd
php72-php-gd : 이미지 처리 모듈
php72-php-fpm
* 7.2 버전 호환성 문제로 몇 몇 패키지 사용 불가 7.1 버전 설치 했음.
// php7.1 설치
# yum install yum-utils
# yum-config-manager --enable remi-php71
# yum update
# yum --enablerepo=remi-php71 install php
2. Apache 연동
위 설치 과정대로 따라오면 보통 설치 시 알아서 php설정 파일이 생성되는데,
간혹 설정파일이 제대로 생성되지 않으면 수동으로 PHP와 아파치 웹 서버를 연동시켜 주어야 한다.
#vim /etc/httpd/conf.d/php.conf