First of all, we want to install Apache and PHP on our Linux server.
PHP installation method and Apache method is like a rut
Please refer to: http://www.jb51.net/article/94494.htm
Two. Close Firewall service, close SELinux
Please refer to: http://www.cnblogs.com/dagege/p/5947251.html
Three. We use the FTP service or the RZ command to put the files under the Apache root directory/var/www/html
Sample file Download: Http://files.cnblogs.com/files/dagege/liuyanban.zip
[Root@localhost/]# cd/var/www/html/
[root@localhost html]# ls-la
total dosage 8
drwxr-xr-x. 3 Root 55 October 11 22 : A.
Drwxr-xr-x. 4 root root 31 October 15:40.
-rw-r--r--1 root 123 October one 22:31 index.php
-rw-r--r--1 root root 3704 September 15:05 juezhen.php
drwxr-xr-x 2 Root 6 October 22:30 messages
[root@localhost html]# chmod o+w messages/#给messages目录设置普通有用户的写入权限
Four. Start httpd service
[Root@localhost html]# systemctl start Httpd.service
Five. Results
The above is a small set to introduce Linux under the use of apache+php to realize the function of the Web site, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!