1. Installing Apache
Start Apache with/etc/init.d/httpd start
Apache Default program Directory is/var/www/html
2. Install MySQL
Yum-y install MySQL Mysql-server
Start MySQL with/etc/init.d/mysqld start
Mysql_secure_installation press ENTER to prompt to set the MySQL password until "Thanks for using mysql!" is displayed
3. Install PHP
Yum-y Install PHP
4. Startup settings
Service httpd Start
Service mysqld Start
Configuring HTTPD, Mysqld boot from
Chkconfig mysqld on
Chkconfig httpd on
5. Testing
New test.php in/var/www/html/
<? PHP phpinfo ();
Access: localhost/test.php, display normal the lamp environment installation success
============================================
6. To facilitate the management of MySQL from the web, install phpMyAdmin
Yum-y Install PhpMyAdmin
Configure phpMyAdmin
Modify/etc/phpmyadmin/config.inc.php
$cfg ['Servers'[$i] ['Controluser'] ='Root';//MySQL Control user Settings//(This user must has read-only$cfg ['Servers'[$i] ['Controlpass'] ='xxxxxx';//access to the "Mysql/user"... $cfg ['Servers'[$i] ['User'] ='Root';//MySQL User$cfg ['Servers'[$i] ['Password'] ='xxxxxx';//MySQL password (only needed
Connect the phpMyAdmin installation path to the HTTPD service directory
Ln-s/usr/share/phpmyadmin/var/www/phpmyadmin
Modify/etc/httpd/conf.d/phpmyadmin.conf to modify "Deny from all" to "Allow from all"
<Directory/usr/share/phpMyAdmin/>Adddefaultcharset UTF-8<ifmodule mod_authz_core.c># Apache2.4<RequireAny>Require IP127.0.0.1Require IP::1</RequireAny> </IfModule> <ifmodule!mod_authz_core.c># Apache2.2Order deny,allow allow from all allow from 127.0.0.1 Allow from::1</IfModule></Directory>
Open Http://localhost/phpmyadmin in the browser address bar
To this, the phpMyAdmin configuration is installed successfully!
Build PHP Environment lamp (linux+apache+mysql+php)