Movenow 2012-12-08
| log_format main '$remote_addr - $remote_user [$time_local] "$request" '  '$status $body_bytes_sent "$http_referer" '  '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; | 
| #!/bin/bash mv /usr/local/nginx/logs/access.log /usr/local/nginx/logs/access_`date +%Y%m%d`.log mv /usr/local/nginx/logs/error.log /usr/local/nginx/logs/error_`date +%Y%m%d`.log killall -s USER1 nginx | 
| # wget http://awstats.sourceforge.net/files/awstats-7.0.tar.gz # tar -zxvf awstats-7.0.tar.gz # mv awstats-7.0 /usr/local/awstats # mkdir -p /var/lib/awstats | 
| # mkdir - p /tmp/src/wwwroot/cgi-bin/ # cp  /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf /tmp/src/wwwroot/cgi-bin/ # /usr/local/awstats/tools/awstats_configure.pl -----> Running OS detected: Linux, BSD or Unix Warning: AWStats standard directory on Linux OS is '/usr/local/awstats'. If you want to use standard directory, you should first move all content of AWStats distribution from current directory: /tmp/src to standard directory: /usr/local/awstats And then, run configure.pl from this location. Do you want to continue setup from this NON standard directory [yN] ?输入y | 
| -----> Check for web server install Enter full config file path of your Web server. Example: /etc/httpd/httpd.conf Example: /usr/local/apache2/conf/httpd.conf Example: c:\Program files\apache group\apache\conf\httpd.conf Config file path ('none' to skip web server setup): > none 这里不是apache,写none,跳过# | 
| -----> Update model config file '/tmp/src/wwwroot/cgi-bin/awstats.model.conf' File awstats.model.conf updated. -----> Need to create a new config file ? Do you want me to build a new AWStats config/profile file (required if first install) [y/N] ?输入 y #创建一个全新的统计 | 
| -----> Define config file name to create What is the name of your web site or profile analysis ? Example: www.mysite.com Example: demo Your web site, virtual server or profile name: > 192.168.2.143被统计网站的域名 # | 
| -----> Define config file path In which directory do you plan to store your config file(s) ? Default: /etc/awstats Directory path to store config file(s) (Enter for default): > #回车继续 -----> Create config file '/etc/awstats/awstats.192.168.2.143.conf' Config file /etc/awstats/awstats.192.168.2.143.conf created. -----> Add update process inside a scheduler Sorry, configure.pl does not support automatic add to cron yet. You can do it manually by adding the following command to your cron: /tmp/src/wwwroot/cgi-bin/awstats.pl -update -config=192.168.2.143 Or if you have several config files and prefer having only one command: /tmp/src/tools/awstats_updateall.pl now Press ENTER to continue... A SIMPLE config file has been created: /etc/awstats/awstats.192.168.2.143.conf You should have a look inside to check and change manually main parameters. You can then manually update your statistics for '192.168.2.143' with command: > perl awstats.pl -update -config=192.168.2.143 You can also build static report pages for '192.168.2.143' with command: > perl awstats.pl -output=pagetype -config=192.168.2.143 Press ENTER to finish... |