LAMP stands for Linux (Operating System), Apache HTTP Server, MySQL (Database) and PHP. Of these components, the Operating System and HTTP services come pre-installed with your VPS package. You need to install MySQL and PHP manually.
Note:
Note If you want such prompts to be auto-answered as yes, specify -y in the installation command. For example, yum -y install php.
Proceed with the installation using the command below. This installs MySQL server along with MySQLi.
yum install mysql-server mysql php-mysql
For the configuration changes to take effect, the services need to be started/restarted. Start the MySQL service using the command:
service mysqld start
PHP runs on Apache and you would thus need to restart the httpd service using the command:
service httpd restart
Its a good practice to setup important services on your Server as Auto-Start. This ensures that such services start automatically every time your VPS is started or rebooted. Run the commands below to auto-start Apache and MySQL services:
chkconfig httpd on chkconfig mysqld on
You can now run web applications or your website(s) that require the LAMP stack.