centos6.8 yum怎么安装php
时间:2022-01-24 11:22
centos6.8 yum安装php的方法:1、配置安装包源;2、通过“yum -y install php56w.x86_64 yum -y --enablerepo=webtatic...”执行安装;3、设置php-fpm开机启动即可。 本文操作环境:centos6.8系统、php5.6版、DELL G3电脑 centos6.8 yum怎么安装php? Centos6.8安装php5.6 检查当前安装的PHP包 如果有安装的PHP包,先删除他们, 如: 配置安装包源: 如果想删除上面安装的包,重新安装 执行安装 安装PHP FPM 注:如果想更换到php5.5或5.4版本, 直接把上面的56w换成55w或者54w就可以了 推荐学习:《PHP视频教程》 以上就是centos6.8 yum怎么安装php的详细内容,更多请关注gxlcms其它相关文章!yum list installed | grep php
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64
# Centos 5.X
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
# CentOs 6.x
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
# CentOs 7.X
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
rpm -qa | grep webstatic
rpm -e [上面搜索到的包即可]
yum -y install php56w.x86_64
yum -y --enablerepo=webtatic install php56w-devel
yum -y install php56w-pdo php56w-xml php56w-gd php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-opcache.x86_64
yum -y install php56w-fpm
#设置php-fpm开机启动
chkconfig php-fpm on
#启动php-fpm
/etc/init.d/php-fpm start