CentOS 7使用yum安裝PHP5.6

刪除舊php包

yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
配置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
安裝php5.6.x

yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
安裝php-fpm

yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
配置開機啓動服務

systemctl restart php-fpm
systemctl enable php-fpm
查看是否安裝成功

ps -ef | grep php
netstat -anp | grep 9000

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章