A few days ago replaced a server, re-equipped with a Web server, the approximate process is as follows (due to idle compilation comparison annoying lock, so the direct Yum installation):
I. Installing the Web server Software yum install httpd
Two. Install the PHP yum install php* yum-y install php*--skip-broken
Three. installing MySQL yum install mysql*
Four. After the above three steps, has completed the Apache, PHP, MySQL installation, then directly simple configuration can be
(1) Preparation site vim/etc/httpd/conf/httpd.conf
Add a site:
Namevirtualhost 127.0.0.1:80
<virtualhost 127.0.0.1:80>
ServerName http://www.aaa.com
DocumentRoot "/DATA/WWW/AAA"
<directory "/data/www/aaa/" >
Options followsymlinks includesnoexec Indexes
DirectoryIndex index.php index.html index.shtml
AllowOverride All
Order Deny,allow
Allow from all
</Directory>
</VirtualHost>
(2) Add Apache to the list of Linux services to enable the operation of Apache startup, restart, and shutdown through service.
Chkconfig–-add httpd
Chkconfig httpd on
Extended reading: chkconfig command Details (Linux)
(3) Restart Apache NINGX service httpd restart
Linux under Aphche Preparation tutorial (Center Os)