Because the project needs to add processing for webp format images, and webp format images must be php5.5 or later versions, you have to upgrade the server's php. The upgrade is not required, but there will be new features and new features after the upgrade! The process described below: Step 1 of upgrading php5.3.x to php5.5.x: if the server is 32-bit, run the following command wgethttp: // dl.
Because the project needs to add processing for webp format images, and webp format images must be php5.5 or later versions, you have to upgrade the server's php. The upgrade is not required, but there will be new features and new features after the upgrade!
The process is described below:
Upgrade php5.3.x to php5.5.x
Step 1:
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 2: enable remi Library
Vim/etc/yum. repos. d/remi. repo
If you only want to upgrade to php5.4.x, change the enabled in the [remi] section to 1; if you want to upgrade to php5.5.x, change the enabled in the [remi] and [remi-php55] sections to 1
Step 3: update php with yum and run the command
Yum update-y
Step 4: check the updated version
Php-v
In fact, this step is not so smooth. an error is reported during version check. one is redis and the other is apc. so, the redis error is that you need to upgrade redis, apc. so also needs to be upgraded, but later found that apc does not support php5.5.x, so apc is disabled. The following describes how to upgrade redis.
Upgrade redis to 3.0.3
1. kill the running redis-server process.
2. you can copy the original/etc/redis. conf file to another place for backup.
3. delete all redis-(which should be five) files under the binfile for redis startup.
4. go to the official website wget http://download.redis.io/releases/redis-3.0.3.tar.gz
5. decompress the file, and then cd it to the file, make, of course, You must make test later. if You are prompted at this time that You need tcl 8.5 or newer in order to run the Redis test make: * ** [test] Error 1. Then run make test after installing yum install tcl, and the system prompts no error.
6. make install
7. change the damone of redis. conf to yes and copy the redis. conf file to/etc/redis.
8. start/usr/local/bin/redis-server/etc/redis. conf
The following is how to check whether the website is running normally. the system prompts that the database cannot be connected and mysql is shut down abnormally, which may be caused by the php update process. Solution process:
1. restart mysql
/Etc/init. d/mysqld restart
Failed to start. After checking that no mysql process is running, view the mysql log.
2. View mysql logs
Vim/var/log/mysqld. log
There are two main causes: InnoDBb memory heap is disable, which should be caused by abnormal mysql shutdown during php upgrade, resulting in problems during startup.
To the mysql Directory
Cd/var/lib/mysql
Delete the ib_logfile0 and ib_logfile1 files.
Another reason is that the default-character-set = utf8 parameter in the configuration file cannot be identified. replace the parameter in the/etc/my. cnf configuration file with character_set_server = utf8.
After modifying these two errors, restart mysql.
/Etc/init. d/mysqld restart
Start OK!
This is a success!