yum php版本太低怎么办

藏色散人
Freigeben: 2023-03-05 21:24:01
Original
3297 Leute haben es durchsucht

yum php版本太低的解决办法:首先检查当前安装的PHP包并删除;然后更换rpm源;接着运行“yum install”;最后安装PHP FPM即可。

yum php版本太低怎么办

推荐:《PHP视频教程

yum源默认的版本太低了,手动安装有一些麻烦,想采用Yum更新安装的可以使用下面的方案:

1.检查当前安装的PHP包

yum list installed | grep php
Nach dem Login kopieren

如果有安装的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
Nach dem Login kopieren

2、更换rpm源

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
Nach dem Login kopieren

如果想删除上面安装的包,重新安装

rpm -qa | grep webstatic
Nach dem Login kopieren

rpm -e 上面搜索到的包即可

3.运行yum install

php5.5

yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
Nach dem Login kopieren

php5.6

yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64
Nach dem Login kopieren

php7.0

yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
Nach dem Login kopieren

4.安装PHP FPM

yum install php55w-fpm 
yum install php56w-fpm 
yum install php70w-fpm
systemctl enable php-fpm.service【开机自启动】
Nach dem Login kopieren

本次更新升级PHP版本即可完成!

Das obige ist der detaillierte Inhalt vonyum php版本太低怎么办. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!