In the previous articleSteps to deploy the LAMP environment in CentOS6.2 system environmentThe installation of the lamp environment in CentOS is described, but because the source in centos is relatively old, the php and mysql versions installed are relatively low. The php I installed is 5.3, mysql is 5.1, because some projects require the php5.4 or above environment to support, so you need to upgrade PHP to PHP5.4 or above, I will upgrade PHP directly to PHP5.4.
Because we already know that the lamp environment requires the firewall to open ports 80 and 3306, so this time we first configure the firewall and then install apache directly. For the two tutorials, refer to the previous article.
The following are the PHP5.5 and MySQL5.5.
The first thing to determine is to find the source with php and mysql later versions. Here we use the yum source of Webtatic EL6.
Run the following command to add a new source
Rpm-Uvh http://repo.webtatic.com/yum/el6/latest.rpm
Then, use yum install php55w and yum install mysql55w to install PHP5.5 and MySQL5.5 respectively.
If you have installed earlier versions of PHP and MySQL, you need to use yum remove php-* to uninstall the previously installed PHP, use yum remove mysql-* to uninstall the previously installed MySQL.
Finally, install the relevant php components as needed. Note that you need to change the previous php-* to php55w-* this time -*.
After the upgrade, restart the apache server.