CentOS5.3 how to upgrade php to the latest version through yum
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Method 1: The default php version of CentOS5.3 is 5.1.6, and php versions earlier than 5.2.9 have a vulnerability. However, yumupdatephp * cannot be used in many places on the Internet to upgrade to 5.2.9, it is more common to upgrade to version 5.2.6. after searching for foreign materials, we finally...
Method 1 The default php version of CentOS5.3 is 5.1.6, and php versions earlier than 5.2.9 have a vulnerability. However, yum update php * cannot be upgraded to 5.2.9 in many places on the Internet, it is common to upgrade to version 5.2.6. after searching for foreign materials, we finally find a method to upgrade php to version 5.2.9 from CentOS.
Note: This method can only be upgraded in the official php version. if you have used the online upgrade method to 5.2.6, you will not be able to use this method to upgrade php.
Run the following command:
Rpm-Uvh remi-release-5 *. rpm epel-release-5 *. rpm
Edit/etc/yum. repos. d/remi. repo.
# Vi/etc/yum. repos. d/remi. repo
Add a line at the end of the file:
Priority = 1
Save and exit.
/Etc/yum. repos. d/epel. repo and/etc/yum. repos. d/epel-testing.repo these two files are also edited according to the above method!
The following command is used to upgrade the version. However, after testing, if you upgrade php separately, the system prompts that the upgrade fails. only China Unicom mysql can be upgraded together. Therefore, you must execute the following command to upgrade php to version 5.2.9:
Yum -- enablerepo = remi update php * mysql *
PS: This method upgrades php to 5.3.
Method 2 Or go http://oss.oracle.com/
Source: (http://blog.sina.com.cn/s/blog_45ef57d40100hq7c.html)-CentOS 5.3 through yum upgrade php to the latest version of the method _ Borui _ Sina blog
Next, run the php5.2 rpm package.
Method 3 Vim/etc/yum. repos. d/utterramblings. repo
Name = Jason's Utter Ramblings Repo
Baseurl = http://www.jasonlitka.com/media/el?releasever/?basearch/
Enabled = 1
Gpgcheck = 1
Gpgkey = http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
Yum install httpd php
Currently, I am using this method.
Method 4 CentOS adds an official source for yum
Since centos5.4 is installed with yum to install php version 5.1.6, many sites are developed on 5.2.x, so we need to add other yum repo
To install Php5.2.x and test several unofficial repo repositories. I feel that the code is not very stable and the php version is being upgraded at any time. After searching for a long time, I found centos
The official test repo contains php5.2.x, which makes it easier to install the official centos rpm.
1. add yum repo php5.2.x
Vi/etc/yum. repos. d/CentOS-Testing.repo
Name = CentOS-5 Testing
Baseurl = http://dev.centos.org/centos/?releasever/testing/?basearch/
Enabled = 1
Gpgcheck = 1
Gpgkey = http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
Priority = 1
Yum upgrade php
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.