Getting MySQL Support In PHP5
To get MySQL support in PHP, we can install the php-mysql package. It’s a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:
[bash]yum search php[/bash]
Pick the ones you need and install them like this:
[bash]yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc[/bash]
APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It’s similar to other PHP opcode cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these installed to speed up your PHP page.
APC can be installed as follows:
[bash]yum install php-pecl-apc[/bash]
Now restart Apache2:
Now reload http://10.10.3.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:
Last and final step to match the Host of the Server and ServerName in Apache Config:
And look for #ServerName and modify it to
We are done with LAMP Installation in CentOS 6.3.