First, install and configure MySQL
1.1 Execute Yum command to install MySQL
Yum-y install MySQL Mysql-server
1.2 Add MySQL to boot and start MySQL immediately
Chkconfig–levels 235 mysqld on/etc/init.d/mysqld Start
1.3 Set the MySQL root account password
Mysql_secure_installation
Second, the installation of Apache
2.1 Using the Yum command to install Apache
Yum–y Install httpd
2.2 Set boot up Apache
Chkconfig–levels 235 httpd on
2.3 Start Apache
Service httpd Start
2.4 Now directly in the browser type http://localhost or http://native IP, you should see the Apache test page
Third, install the configuration php
3.1 Installing PHP using the Yum command
Yum–y Install PHP
3.2 Restart the Apache server
Service httpd Restart
3.3 Installation of related modules using PHP to support MySQL: In order to allow PHP to support MySQL, we can install Php-mysql software package, you can also use the following command to search for available PHP modules
Yum Search PHP
Select the required module for installation
Yum–y Install php-mysql php-common php-mbstring php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
3.4 Restart the Apache server
Service httpd Restart