Using Yum to update PHP, you can do it with just one command:
Copy Code code as follows:
But the problem is, after using this command, the system tells me that no updatable packages have been found. The current version of PHP is only 5.2.1,php official has been updated to 5.2.6.
After some inquiries, just know that the original CentOS system source PHP is still 5.2.1, need additional sources to upgrade PHP.
According to the introduction of foreign netizens, ice ancient added an additional source:
After you log in to SSH, run the following commands in turn:
Copy Code code as follows:
#rpm –import Http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
#vi/etc/yum.repos.d/utterramblings.repo #文中这里是使用nano, but VPS can not start the Nano, with VI is also possible to replace
In the open document, add the following:
Copy Code code as follows:
[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
Save.
Run the following command again to complete the upgrade of PHP
Copy Code code as follows:
Similarly, run the following command to upgrade MySQL
Copy Code code as follows: