Upgrade PHP under Linux (Centos)-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Centos can be directly updated using YUM, which is the most convenient. The "yum update php" command can be used. Like most lazy people, I prefer this method,
However, the packages in the warehouse are often not updated frequently, and many of them are old. for example, in PHP and Centos, there seems to be no version above 5.2. Now the highest is 5.1.6. we cannot use this method to upgrade to version 5.2 or above.
In addition, we have two ways to Upgrade PHP. 1) download the PHP source code from the official website for compilation and installation. 2) download the compiled RPM package for upgrade and installation.
If the source code is compiled and installed for the first time or has been compiled and installed before, this method is still very good. however, if it was previously self-installed by the system, or the RPM package is installed. the upgrade does not need to be changed too much now. if you want to smoothly transition, directly using RPM upgrade will be a good solution.
There are many RPM packages on the Internet. I have found two places,
"Http://oss.oracle.com/projects/php/files/" this is the PHP2.5 package compiled by Oracle on E15, but it is a pity that" php-mcrypt "is not compiled above. If this is not required, this package is preferred. after all, Centos itself is E15, which can be upgraded smoothly. You can use "rpm-Uvh php *" to Upgrade PHP,
"Http://download1.4psa.com/php_rpms/rhel5/i386/", above PHP2.5 and PHP2.6 are on the RedHat above, in Centos is also very good to use. use "yum-e php" to uninstall the old PHP, and then use "yum-I *" to install it.
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