系统环境
十载的如皋网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。营销型网站的优势是能够根据用户设备显示端的尺寸不同,自动调整如皋建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“如皋网站设计”,“如皋网站推广”以来,每个客户项目都认真落实执行。centos6.4 (最小化安装)
apr-1.4.5.tar.gz
arp-util-1.3.12.tar.gz
awstats-7.3.tar.gz
httpd-2.4.9.tar.gz
pcre-8.10.tar.gz
1.
#yum -y install gcc
#yum -y install gcc-c++
#yum -y install make
2.安装apache
#tar xvf apr-1.4.5.tar.gz
#cd apr-1.4.5
#./configure --prefix=/usr/local/apr
#make
#make install
#tar xvf apr-util-1.3.12.tar.gz
#cd apr-util-1.3.12
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
#make
#make install
#tar xvf pcre-8.10.tar.gz
#cd pcre-8.10
#./configure --prefix=/usr/local/pcre
#make
#make install
#tar xvf httpd-2.4.9.tar.gz
#cd httpd-2.4.9
#./configure
--enable-so
--enable-mods-shared=all
--enable-threads
--enable-cache
--enable-mem-cache
--enable-disk-cache
--enable-file-cache
--with-mpm=prefork
--with-apr=/usr/local/apr
--with-apr-util=/usr/local/apr-util/
--with-pcre=/usr/local/pcre/
#make
#make install
添加开机启动
# echo “/usr/local/apache2/bin/apachectl start” >> /etc/rc.d/rc.local
3.安装awstats
#yum -y install perl
#tar xvf awstats-7.3.tar.gz
#mv awstats-7.3 /usr/local/awstats //awstats默认路径
#cd /usr/local/awstats/tools
#perl awstats_configure.pl
4.修改apache 虚拟主机设置
#vi /usr/local/apache2/conf/httpd.conf
取消掉以下注释
#Include conf/extra/httpd-vhosts.conf
注释掉以下
LogFormat "%h %l %u %t "%r" %>s %b" common
虚拟机文件配置如下
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/usr/local/apache2/htdocs"
ServerName log.test.com
ServerAlias log.test.com
ErrorLog "logs/test-error_log"
CustomLog "logs/test-access_log" combined
5.修改/etc/awstat配置文件
#vi awstats.log.test.com.conf
LogFile
LogType
LogFormat
DirData="/var/lib/awstats"
DirData修改为自己想要的目录
DirData="/etc/awstats/data"
#mkdir /etc/awstats/data
#chmod 777 /etc/awstats/data
6.更新数据库
#perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=log.test.com -update
7.配置完awstats 修改httpd.conf
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
Options All
AllowOverride None
Order allow,deny
Allow from all
Require all granted //添加这一项 否则提示403错误