安装阿里云epel源 yum install -y epel-release wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 安装remi源 rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm 安装php7.2.X yum install -y --enablerepo=remi --enablerepo=remi-php72 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof 注意这里是--enablerepo=remi-php72,安装php56的话会报错,说至少要php7.1 查看是否安装成功 php -v 安装php-fpm yum install --enablerepo=remi --enablerepo=remi-php72 php-fpm 配置开机启动服务 systemctl restart php-fpm systemctl enable php-fpm 查看是否安装成功 ps -ef | grep php netstat -anp | grep 9000 完了之后可以安装phpmyadmin了 卸载php72 yum -y remove php* 参考:https://www.cnblogs.com/ydwzhang/p/11509847.html 参考来自: https://www.cnblogs.com/ydwzhang/p/11543556.html https://www.cnblogs.com/wuyongsheng/p/8006240.html https://www.cnblogs.com/ydwzhang/p/11509847.html