1. Installing Apache
[Email protected] ~]# yum-y install httpd
# Boot from Boot
[Email protected] ~]# chkconfig httpd on
# Start httpd Service
[[Email protected] ~]# service httpd start
# # # installs Apache some extensions
[Email protected] ~]# yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql
Now just type http://localhost or HTTP///native IP directly in the browser and you should see the Apache test page
Here, you need to pay attention to the iptables settings.
650) this.width=650; "src=" http://www.linuxidc.com/upload/2014_07/14072309064437.jpg "alt=" CentOS 6.5 use Yum to quickly build the lamp environment "width=" 581 "vspace=" 5 "style=" Line-height:24.5px;border:0px;height:auto; "/>
2. Installation configuration MySQL
# MySQL client program
# Mysql-server Service-side program
# Mysql-devel Development and Design Library
[[email protected] ~]# yum-y install MySQL mysql-server mysql-devel
# Boot up
[Email protected] ~]# chkconfig mysqld on
# Start MYSQLD Service
[[Email protected] ~]# service mysqld start
# Make some security configuration
[Email protected] ~]#/usr/bin/mysql_secure_installation
[Email protected] ~]# NETSTAT-TULPN | Grep-i MySQL
TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1723/mysqld
OK, we see that the mysqld is up and listening on port 3306.
3. Install PHP
Install the relevant module: In order for PHP to support MySQL, we can install the Php-mysql software package, or use the following command to search for available PHP modules
[Email protected] ~]# yum-y install PHP php-mysql
# Install PHP Common extensions
[email protected] ~]# Yum search php
[Email protected] ~]# yum-y install GD php-gd gd-devel php-xml php-common php-mbstring php-ldap php-pear php-xmlrpc php- Imap
# # # Restart the httpd service, this step is important
[Email protected] ~]# service httpd restart
We then provide a PHP page to test
[Email protected] ~]# cd/var/www/html/
[Email protected] html]# VI index.php
<?php
Phpinfo ();
?>
Then, again, in the browser type http://localhost or http://Native IP, you should see the following page
650) this.width=650; "src=" http://www.linuxidc.com/upload/2014_07/14072309061127.jpg "alt=" CentOS 6.5 use Yum to quickly build the lamp environment "width=" 581 "vspace=" 5 "style=" Line-height:24.5px;border:0px;height:auto; "/>
4. Installation Configuration phpMyAdmin
After installing Mysql,apache and PHP, we can install phpMyAdmin for visual management of MySQL database. Download the latest version of the website: http://www.phpmyadmin.net/home_page/
Under Windows, in fact Navicat is also a very useful MySQL visualizer, recommended to use.
[Email protected] ~]# Unzip Phpmyadmin-4.2.6-all-languages.zip
[Email protected] ~]# MV Phpmyadmin-4.2.6-all-languages/var/www/html/phpmyadmin
[Email protected] ~]# cd/var/www/html/phpmyadmin
[email protected] ~]# CP libraries/config.default.php config.inc.php
[Email protected] ~]# VI cnfig.inc.php
$cfg [' pmaabsoluteuri '] = '; Fill in PhpMyAdmin's access URL here.
$cfg [' Servers '] [$i] [' host '] = ' localhost '; MySQL hostname or IP address
$cfg [' Servers '] [$i] [' port '] = '; MySQL Port-leave blank for default port
$cfg [' Servers '] [$i] [' user '] = ' root '; Fill in the MySQL username used by MySQL access phpMyAdmin, which defaults to root.
fg[' Servers ' [$i] [' password '] = '; Fill in the password corresponding to the MySQL user name above.
# then restart, httpd service
[Email protected] ~]# service httpd restart
You can access it by typing http://localhost/phpmyadmin in the browser.
If you encounter an issue with access rights, check SELinux.
This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1765335
CentOS 6.5 uses Yum to quickly build the lamp environment