1. Installation source
1.1 Install EPEL software package
# yum -y install epel-release
1.2 Install remi source
# yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
1.3 Install yum extension package:
# yum -y install yum-utils
1.4 Enable remi warehouse:
# yum-config-manager --enable remi-php72 && yum update
2. Install PHP service
2.1 Install PHP7.2
# yum -y install php72
Enter php72 -v to view the installation result
2.2 Install php-fpm and some other modules:
# yum -y install php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache
3.php-fpm service
3.1 Set Auto-Start
# systemctl enable php72-php-fpm.service
3.2 Common php-fpm commands
- Open service
# systemctl start php72-php-fpm.service
- Out of service
# systemctl stop php72-php-fpm.service
- View status
# systemctl status php72-php-fpm.service
- Restart the service
# systemctl restart php72-php-fpm.service