centos7重装PHP7.1
1、在centos7中先切换yum安装源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
以上如出错则可尝试下面的,
yum install epel-release -y
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
更新完成后为防止冲突,先删除可能存在的php包
yum -y remove php*
2、安装PHP
yum install -y php71w
3、安装PHP依赖
yum install -y php71w-fpm php71w-opcache php71w-cli php71w-gd php71w-imap php71w-mysqlnd php71w-mbstring php71w-mcrypt php71w-pdo php71w-pecl-apcu php71w-pecl-mongodb php71w-pecl-redis php71w-pgsql php71w-xml php71w-xmlrpc php71w-devel mod_php71w
安装完成后可查看PHP版本信息
php -v
4、将mysql与php关联(须在已经安装完MySQL的前提下)
yum -y install php-mysql --skip-broken
centos7重装PHP7.1
最新推荐文章于 2024-06-08 11:37:47 发布