Home > Article > Backend Development > What should I do if the yum php version is too low?
The solution to the problem that the yum php version is too low: first check the currently installed PHP package and delete it; then change the rpm source; then run "yum install"; and finally install PHP FPM.
Recommended: "PHP Video Tutorial"
The default version of yum source is too low, manual installation requires some Trouble, if you want to use Yum update and installation, you can use the following solution:
1. Check the currently installed PHP packages
yum list installed | grep php
If there are PHP packages installed, delete them first
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. Change the rpm source
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
If you want to delete the package installed above, reinstall
rpm -qa | grep webstatic
rpm -e The package searched above can be
3. Run 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
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
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
4. Install PHP FPM
yum install php55w-fpm yum install php56w-fpm yum install php70w-fpm systemctl enable php-fpm.service【开机自启动】
This update can be completed by upgrading the PHP version!
The above is the detailed content of What should I do if the yum php version is too low?. For more information, please follow other related articles on the PHP Chinese website!