In Linux, PHP can be quickly upgraded to 5.2.6 (1) and re-compiled and installed with Yum (2 ).

Source: Internet
Author: User
Tags gpg

In Linux, the default Yum source is installed with the PHP 5.1 package,

After installing php In yum, View

Rpm-Qa PHP

Php-5.1.6-23.2.el5_3

Some programs require php5.2 or later versions.

So I found the information and finally found an introduction to add an additional source as follows:

# Rpm-import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# Gedit/etc/yum. Repos. d/utterramblings. Repo
You can also directly modify the name of/etc/yum. Repos. d/utterramblings. Repo. You can customize the name to end with. Repo, such as ABC. repo.

Add the following content to the open file:

[ABC]
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

Execute Yum update PHP,

# Yum update PHP Loaded plugins: rhnplugin, security This system is not registered with RHN. RHN support will be disabled. Utterramblings | 951 B 00: 00 Utterramblings/primary | 39 kb 00:03 Utterramblings 140/140 Skipping Security plugin, no data Setting up update process Resolving Dependencies Skipping Security plugin, no data -> Running transaction check -> Processing dependency: PhP = 5.1.6-23.2.el5 _ 3 for package: PHP-devel -> Package PHP. i386. 2.16-jason.1 set to be updated -> Processing dependency: PHP-common = 5.2.16-jason.1 for package: PHP -> Processing dependency: PHP-cli = 5.2.16-jason.1 for package: PHP -> Running transaction check -> Package php-cli.i386. 2.16-jason.1 set to be updated ........ A new PHP package token has been updated. ========================================================== ========================================================== Package arch version repository size ========================================================== ========================================================== Updating: PHP i386 5.2.16-jason.1 ABC 3.6 m Installing for dependencies: Mysqlclient15 i386 5.0.91-1. jason.1 ABC 2.0 m Updating for dependencies: MySQL i386 5.1.52-jason.1 ABC 3.5 m Mysql-connector i386 5.1.52-jason.1 ABC 502 K Mysql-devel i386 5.1.52-jason.1 ABC 120 K Mysql-server i386 5.1.52-jason.1 ABC 13 m Mysql-test i386 5.1.52-jason.1 ABC 7.3 m Php-bcmath i386 5.2.16-jason.1 ABC 67 K Php-cli i386 5.2.16-jason.1 ABC 2.6 m Php-common i386 5.2.16-jason.1 ABC 513 K Php-DBA i386 5.2.16-jason.1 ABC 127 K Php-devel i386 5.2.16-jason.1 ABC 557 K Php-Gd i386 5.2.16-jason.1 ABC 331 K Php-imap i386 5.2.16-jason.1 ABC 108 K Php-LDAP i386 5.2.16-jason.1 ABC 59 K Php-mbstring i386 5.2.16-jason.1 ABC 1.3 m Php-mysql i386 5.2.16-jason.1 ABC 267 K Php-ncurses i386 5.2.16-jason.1 ABC 78 K Php-odbc i386 5.2.16-jason.1 ABC 116 K Php-PDO i386 5.2.16-jason.1 ABC 164 K Php-pgsql i386 5.2.16-jason.1 ABC 159 K Php-SNMP i386 5.2.16-jason.1 ABC 44 K Php-soap i386 5.2.16-jason.1 ABC 352 k Php-XML i386 5.2.16-jason.1 ABC 328 K Php-XMLRPC i386 5.2.16-jason.1 ABC 136 K
Transaction Summary ========================================================== ========================================================== Install 1 package (s) Update 24 package (s) Remove 0 package (s)
Total download size: 37 m

Is this OK [Y/n]: Y restart Apache after installation view PHP current installation version # rpm-Qa phpphp-5.2.16-jason.1

After the installation is complete, you can also use PHP-m to view the modules supported by PHP, such as] # PHP-M | grep MySQL MySQL Mysqli Pdo_mysql

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.