dev/linux

[CentOS 7] Install PHP7 (설치하기)

재삐신생 2019. 9. 20. 01:58
반응형

1. Install EPEL

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

 

 

2. Enable Remi repository

sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

 

 

3. Install yum-utils

sudo yum install yum-utils

 

4. PHP 버전 선택

sudo yum-config-manager --enable remi-php70
sudo yum-config-manager --enable remi-php71
sudo yum-config-manager --enable remi-php72
sudo yum-config-manager --enable remi-php73
sudo yum-config-manager --enable remi-php74

 

PHP 설치

sudo yum install php php-cli php-common php-fpm php-mcrypt php-pdo php-mysqlnd php-mbstring php-gd php-curl php-ldap php-zip php-fileinfo

 

 

※ php-fpm 서비스 ON

sudo chkconfig php-fpm on

※ php 버전 확인

php -v

 

 

 

반응형