Author's note:
Not entirely original
I want to find a tutorial,
However, according to a tutorial, you have made thousands of commands,
Half left,
I can't afford it anymore.
Based on lnmp configuration experience,
Try it by yourself.
Lucky success.
The following is the text
Certificate -----------------------------------------------------------------------------------------------------------------------------------
Configure a third-party yum source for CentOS 6.2 (no nginx software package exists in the default standard source for CentOS)
Yum install wget # install the download tool wget
Wget http://www.atomicorp.com/installers/atomic # download atomic yum Source
Sh./atomic # Installation
Yum check-update # update yum Software Package
1. install and configure MySQL
1.1 run the yum command to install MySQ
Yum-y install mysql-server |
1.2 add MySQL to the startup Item 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 |
Press enter and enter Y as prompted.
Enter the password twice and press Enter.
Enter Y as prompted
Thanks for using MySQL!
After setting the MySql password, restart MySQL:
# Restart
Ii. install Apache
2.1 use the yum command to install Apache
2.2 set Apache startup
Chkconfig -- levels 235 httpd on |
2.3 start Apache
2.4 enter http: // localhost or http: // local IP in the browser. The Apache test page is displayed.
3. install and configure PHP
3.1 Use the yum command to install PHP
3.2 restart the Apache server
/Etc/init. d/httpd restart |
3.3 install related modules using PHP to support MySQL: To enable PHP to support MySQL, we can install the php-mysql software package, or use the following command to search for available php modules
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
/Etc/init. d/httpd restart |
Ps: apache default website directory/var/www/html