1.
Preparatory work:
[Email protected] ~]# rpm-e httpd--nodeps
2.
[[email protected] ~]# mkdir 123 ( create a directory )
[email protected] ~]# mount-ousername=administrator//172.16.1.111/123 Space 123 ( sharing the host's software on Linux )
650) this.width=650; "Width=" 540 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
3.
[email protected]]# tar zxvf httpd-2.2.17.tar.gz h-c/usr/src ( unpacking )
650) this.width=650; "Width=" 461 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
4.
[Email protected]/]# cd/usr/src/httpd-2.2.17/
[email protected] httpd-2.2.17]#/configure--prefix=/usr/local/httpd--enable-so--enable-rewrite-- Enable-charset-lite--enable-cgi ( configuration )
5.
[[email protected] httpd-2.2.17]# make&& make install ( compile installation )
6.
[[email protected] httpd-2.2.17]# ls/usr/local/httpd/( Confirm installation Results )
650) this.width=650; "width=" 385 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
7.
[Email protected] httpd-2.2.17]# ln-s/usr/local/httpd/bin/*/usr/local/bin/
[[email protected] httpd-2.2.17]# ls-hl/usr/local/bin/( optimized execution path )
650) this.width=650; "Width=" 530 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
8.
[[email protected] ~]# httpd–v ( View program version )
9 .
[Email protected] ~]# CP/USR/LOCAL/HTTPD/BIN/APACHECTL/ETC/INIT.D/HTTPD
( Add system service )
Ten .
[email protected] ~]# vim/etc/init.d/httpd ( add two lines )
#chkconfig 35 85 21
#description: Startup script for the apachehttp server
650) this.width=650 "width=" 492 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
[[email protected] ~]# chkconfig--add httpd (// add httpd as System service )
[email protected] ~]# chkconfig--list httpd (// View httpd service's self-boot status )
httpd 0: off 1: Off 2: Off 3: Enable 4: Off 5: Enable 6: Off
650) this.width=650, "width=" 504 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
12.
[email protected] ~]# vim/etc/sysconfig/network ( modify localhost to www)
650) this.width=650; "width=" 420 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
[[email protected] ~] #vim/etc/hosts Adding IP mappings
650) this.width=650; "Width=" 606 "height=" + "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
[[email protected] ~]# init 6 Restart takes effect
13.
[email protected] ~]# vim/usr/local/httpd/conf/httpd.conf ( configure httpd service )
650) this.width=650; "Width=" 596 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" spacer.gif "/>
Modify Line 97th
14.
[email protected] ~]#/usr/local/httpd/bin/apachectl–t ( Check grammar )
Syntax OK
15.
[[Email protected]~]#/etc/init.d/httpd start ( start httpd service )
HTTPD (PID 1763) already running
16.
[email protected] ~]# NETSTAT-ANPT | grep httpd ( view port )
17.
[Email protected]~] #cat/usr/src/local/httpd/htdocs/index.html
Validation tests
Linux Validation Results:
650) this.width=650; "Width=" 554 "height=" 137 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
Windows Validation Results:
650) this.width=650; "Width=" 472 "height=" 177 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
Deploy the Awstats Analysis system
1. Installing the Awstats package
[[email protected]] #tar zxvf awstats-7.3-c/usr/local/
[email protected] local] #mv awstats-7.3 awstats
2. Setting up profiles for statistical sites
[[email protected]] #cd/usr/local/awstats/tools
[[email protected]] #chomd a+x awstats_configure.pl
[Email protected] tools]#./awstats_configure.pl
650) this.width=650; "Width=" 382 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
650) this.width=650; "width=" 364 "height=" + src= "/e/u261/themes/default/images/spacer.gif" style= "background: URL ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/> httpd.conf file path Enter will prompt for two times Y
650) this.width=650, "width=" 297 "height=" "src=,"/e/u261/themes/default/images/spacer.gif "style=" background: URL ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/> Specify the target site name to be counted
650) this.width=650; "Width=" 553 "height=" 208 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
Press ENTER directly
3. Modify the site statistics configuration file
[email protected] tools]# vim/etc/awstats/awstats.www.benet.com.conf
logfile= "/usr/local/httpd/logs/access_log" ( Modify this configuration file )
650) this.width=650; "Width=" 447 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
4.mkdir/var/lib/awstats Create a specified log directory
Perform log analysis and set up cron scheduled Tasks
650) this.width=650; "Width=" 408 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
5. Visit Awstats
On the client side into the http://benet.com/awstats/awstats.pl?config=www.benet.com
This article is from the "12323622" blog, please be sure to keep this source http://12333622.blog.51cto.com/12323622/1922274
Build Apache service on top of Linux