Upgrade PHP and MySQL under CentOS with yum


yumIt is a tool provided by CentOS system to easily add / delete / update RPM packages. It can automaticallysolveThe dependency of packages.

Update PHP with yum, just onecommandYou can do it:

#yum update php

But the problem is, after using this command,systemTell me, no updatable packages found. The current PHP version is only 5.2.1, PHPofficialIt has been updated to 5.2.6.

After some inquiry, I learned that PHP in the original CentOS system source is still 5.2.1, and additional sources are needed to upgrade PHP.

According to the introduction of foreign netizens, binggu added additional sources:

Log in to SSH and thenfunctionThe following commands:

#rpm –import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

#vi /etc/yum.repos.d/utterramblings.repo #

In this article, nano is used, but VPS cannot start nano, and it is also possible to replace it with VI

Add the following content to the open document:

name=Jason’s Utter Ramblings Repo


Run the following command again to complete the PHP upgrade

#yum update php

Similarly, run the following command to upgrade MySQL

#yum update mysql

Recommended Today

Parsing PHP observer mode observer

catalogue Observer mode structure diagram concept Code example Observer mode structure diagram concept An “actor” (observed), a group of “audience” (observers), a “camera” (recording container) [main roles in observer mode] 1. Abstract subject role: the subject role saves all references to observer objects in a set, and each subject can have any number of observers. […]