centos7.5下yum安装php-5.6.40(LNMP环境)

cd /etc/yum.repos.d/
yum -y install epel-release                                      #<===安装centos7下php5.6的epel和remi源
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php             #<===查看php-5.6相关包
yum -y install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common
yum list installed |grep php                       #<===查看yum安装的软件包
rpm -ql php-fpm.x86_64                           #<===查看php软件包所在路径
php -version                                             #<===查看PHP版本安装是否正确
systemctl start php-fpm
systemctl enable php-fpm
lsof -i :9000

  

 

转载于:https://www.cnblogs.com/blog-tim/p/10573477.html

你可能感兴趣的:(centos7.5下yum安装php-5.6.40(LNMP环境))