
正文
其他综合-CentOS 7 使用yum 安装 PHP 5.6
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
其他综合-CentOS 7 使用yum 安装 PHP 5.61、删除旧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
2、配置epel源
yum install -y epel-releasewget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3、配置remi源
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
4、安装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
5、安装php-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
6、配置开机启动服务
systemctl restart php-fpmsystemctl enable php-fpm
7、查看是否安装成功
ps -ef | grep phpnetstat -anp | grep 9000






