CentOS5.3 how to upgrade php to the latest version through yum
Source: Internet
Author: User
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:
Wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
Wget http://rpms.famillecollet.com/enterprise/5/remi/i386/remi-release-5-7.el5.remi.noarch.rpm
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
Input
[Utterramblings]
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
Final installation
Yum install httpd php
Currently, I am using this method.
Php-5.2.11
Httpd-2.2.14
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
C5-testing
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
2. Installation
Yum upgrade php
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.