Centos7.x安装 php5.6 和5.7版本

安装5.6

 运行yum install

 yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64

 yum install php56w-fpm 

安装7.2

   yum install php72w php72w-opcache  php72w-xml  php72w-mcrypt   php72w-gd php72w-devel php72w-mysqlnd  php72w-intl    php72w-mbstring   php72w-pear  php72w-pdo  php72w-fpm
 

安装nginx  

 yum install nginx 

修改php7.2-fpm的配置文件,端口修改成9001   

重启服务:

   service nginx restart

   service php56-fpm restart

   service php72-fpm restart

你可能感兴趣的:(PHP开发)