具體方法:
(推薦教程:php視頻教程)
1、檢查當前已安裝的php包
yum?list?installed?|?grep?php
2、如果有已安裝的PHP包,先刪除他們
立即學習“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
3、配置centos 7.0的yum源
yum?install?epel-release rpm?-ivh?http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
4、使用yum list命令查看可安裝的包(Packege)
yum?list?--enablerepo=remi?--enablerepo=remi-php56?|?grep?php
5、安裝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
6、查看已安裝的PHP版本。
php?--version
7、安裝php-fpm
yum?install?--enablerepo=remi?--enablerepo=remi-php56?php-fpm
(相關推薦:php視頻教程)
8、重新apache和php啟動服務
$?sudo?systemctl?restart?httpd $?sudo?systemctl?restart?php-fpm
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦