Command to install the Remi repository configuration package:
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Command to install the yum-utils package (for the yum-config-manager command):
yum install yum-utils
The php56 collection is available in the remi-safe repository
Command to install:
yum install php56
Command to install additional packages:
Command to check the installed version and available extensions:
php56 --version
php56 --modules
Enable php-fpm:
vi /etc/yum.repos.d/remi.repo
Find [remi] and [remi-php56] block, enable this repository, you have to change enabled=0 into enabled=1, after the change the blocks look like this:
Save the file. You are now ready to install PHP-FPM
yum install php-fpm
To ensure it also starts automatically with the server, run the following command:
systemctl enable php-fpm
Running:
systemctl start php-fpm
instead of editing remi.rpo file we can also use :
yum-config-manager --enable remi-php56
来源:https://gist.github.com/ayonliu/19a0bfe91f5d1fc7dec00eebc13b3314
网友评论