Install Apache
1. Uninstall the built-in httpd dependent package.
[Root $ localhost ~] # Rpm-e httpd-manual Webalizer subversion mod_python mod_ssl PHP-cli PHP-ldap php-common -- nodeps
2. decompress and compile and install httpd2.27
[Root $ localhost CDROM] # tar-zxf httpd-2.2.7.tar.gz
[Root $ localhost CDROM] # cd httpd-2.2.7
[Root $ localhost httpd-2.2.17] #./configure -- prefix =/usr/local/httpd -- enable-so -- enable-Rewrite
-- Enable-charset-lite -- enable-CGI
[Root $ localhost httpd-2.2.17] # Make & make install
3. Start the service:/usr/local/httpd/bin/apachectl start
Check whether port 80 is monitored by httpd. Because the httpd that comes with the system has been uninstalled, the Service httpd start prompt is not identified.
[Root $ localhost httpd-2.2.17] # netstat-anpt | grep httpd
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/49/15/wKioL1QOkBCj55yOAAC7DPbTXZM922.jpg "Title =" 1.jpg" alt = "wkiol1qokbcj55yoaac7dpbtxzm922.jpg"/>
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/15/wKioL1QOkQiBS_9XAADwZ2y_e34555.jpg "Title =" 2.jpg" alt = "wkiol1qokqibs_9xaadwz2y_e34555.jpg"/>
Install AWStats
AWStats is a free and concise website log analysis tool with strong personality. It can collect the following information about your site: visits, visits, page views, clicks, data traffic, etc., accurate to monthly, daily, hourly data, visitor country, visitor IP address, robots/spiders statistics, visitor duration, statistics on different files types, pages-URL statistics, visitor operating system browsers, and other information (search keywords, etc)
[Root $ localhost CDROM] # unzip awstats-7.0.zip
[Root $ localhost CDROM] # mv awstats-7.0/usr/local/AWStats
[Root $ localhost CDROM] # cd/usr/local/AWStats/tools/
[Root $ localhost tools] #./awstats_configure.pl
Configure AWStats. Note that AWStats needs to obtain the path of your Apache main configuration file.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/15/wKioL1QOkpKQotR8AAJstXU891Q135.jpg "Title =" partition _059.png "alt =" wkiol1qokpkqotr8aajstxu891q135.jpg "/>
Edit the/etc/AWStats/awstats.www.dargon.com. conf file and modify the following content. The directory pointed to by the dirdata option does not exist and needs to be created manually.
Logfile = "/usr/local/httpd/logs/access_log"
Dirdata = "/var/lib/AWStats"
[[Email protected] tools] # mkdir/var/lib/AWStats
[[Email protected] tools] # chmod-r 777/var/lib/AWStats
Set the task scheduler to update AWStats log monitoring every 5 minutes
[Root $ localhost tools] crontab-e
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/49/13/wKiom1QOk8qiVA4ZAAA82QUBGiY814.jpg "Title =" 7.jpg" alt = "wkiom1qok8qiva4zaaa82qubgiy814.jpg"/>
[Root $ localhost tools] # service cdron restart
[Root $ localhost tools] #/usr/local/htttpd/bin/apachectl restart
Traffic Statistics:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/49/13/wKiom1QOlF7TG4gqAANyceP4emM232.jpg "style =" float: none; "Title =" 8.jpg" alt = "wkiom1qolf7tg4gqaanycep4emm232.jpg"/>
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/49/13/wKiom1QOlGKD3DnuAAPOMSPWE2g964.jpg "style =" float: none; "Title =" 9.jpg" alt = "wkiom1qolgkd3dnuaapomspwe2g964.jpg"/>
This article allows reprint but be sure to retain the source, otherwise investigate the law: http://dragon123.blog.51cto.com/9152073/1550183
Install Apache and deploy AWStats