Confirm the PHP version
rpm -qa | grep php
Install PHP
REPO
sudo yum -y install epel-release
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
PHP
sudo yum -y install --enablerepo=remi,remi-php55 php55 php55-php-fpm php55-php-cli php55-php-common php55-php-devel php55-php-gd php55-php-intl php55-php-mbstring php55-php-pdo php55-php-mysqlnd php55-php-pear php55-php-xml php55-php-mcrypt php55-php-soap
PECL
sudo yum install -y --enablerepo=remi,remi-php55 php55-php-pecl-imagick php55-php-opcache php55-php-pecl-memcache php55-php-pecl-memcached php55-php-pecl-apcu php55-php-pecl-xdebug
php.ini
/opt/remi/php55/root/etc/php.ini
memory_limit = 512M
sendmail_path = /opt/mailhog/mhsendmail
php-fpm.d/www.conf
vi /opt/remi/php55/root/etc/php-fpm.d/www.conf
listen = 127.0.0.1:9000
↓
listen = 127.0.0.1:9055
/etc/httpd/conf.d/vhosts.conf
SetHandler “proxy:fcgi://127.0.0.1:9000”
↓
SetHandler “proxy:fcgi://127.0.0.1:9055”
Service
- Service list
[vagrant@drupal etc]$ systemctl list-unit-files -t service | grep php
php55-php-fpm.service disabled
- Disable php7.1
sudo systemctl disable php-fpm.service
- Enable php55
sudo systemctl enable php55-php-fpm.service
- Stop php7.1
sudo systemctl stop php-fpm.service
- Start php55
sudo systemctl start php55-php-fpm
Confirm
http://www.drupal.vm.local/phpinfo.php