Linux php5.3.x upgrade to php5.5.x

Source: Internet
Author: User
The first step:

If the server is 32-bit, run the following command

wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
RPM-UVH remi-release-6*.rpm epel-release-6*.rpm

If the server is 64, run the following command

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
RPM-UVH remi-release-6*.rpm epel-release-6*.rpm

Step two: Open the Remi Library

Vim/etc/yum.repos.d/remi.repo

If you only want to upgrade to php5.4.x, then change the [Remi] section to 1, and if you want to upgrade to php5.5.x, change the [Remi] and [remi-php55] parts of enabled to 1

Step three: Yum updates PHP, runs commands

Yum Update-y

Fourth step: Check the updated version

Php-v

In fact, in this step, not so smooth, check the version of the error, one is Redis, one is apc.so, Redis's error is the need to upgrade redis,apc.so also need to upgrade, but later found that APC does not support php5.5.x, so disable APC. Here's how Redis is upgraded.

Redis upgrade to 3.0.3

1. Kill the running Redis-server process.
2. The original/etc/redis/redis.conf can be copied to other places for backup.
3. Delete the redis-(which should be 5) files under the boot Redis bin file.
4. Go to the official website wget http://download.redis.io/releases/redis-3.0.3.tar.gz
5. Unzip the file, then CD to the file, make, and of course must be done test, if you are prompted at this time need TCL 8.5 or newer in order to run the Redis test make: * * [Test] E Rror 1. Then Yum installs Tcl and then runs make test after installation, prompting for no errors.
6. Make Install
7. Change the Damone of redis.conf to Yes copy the. conf file for Redis to/etc/redis
8. Under/usr/local/, start the/usr/local/bin/redis-server/etc/redis/redis.conf

The following is to check whether the site is working properly, prompted to connect to the database, found that MySQL is not properly shut down, which may be caused by the process of updating PHP. Resolution process:

1. Restart MySQL

/etc/init.d/mysqld restart

found no boot. After checking that there is no MySQL process running, then view the MySQL log.

2. View the MySQL log

Vim/var/log/mysqld.log

There are two main causes: one is the INNODBB memory heap is disable, this should be because the upgrade of PHP process caused by MySQL abnormal shutdown, resulting in a problem when booting.

To the MySQL directory

Cd/var/lib/mysql

Delete the Ib_logfile0 and ib_logfile1 two files.

Another reason is that the Default-character-set=utf8 in the configuration file cannot be identified, and the parameter in the/ETC/MY.CNF configuration file is changed to Character_set_server=utf8 (unrecognized character_ SET_SERVER=UTF8) Don't bother!

"Cp/usr/share/mysql/my-medium.cnf/etc/my.cnf #拷贝配置文件 (Note: If the/etc directory has a my.cnf under the default, you can overwrite it directly)"

After modifying these two errors, restart MySQL

/etc/init.d/mysqld restart

Start ok!

  • 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.