zoukankan      html  css  js  c++  java
  • [Linux]-Apache,awstats部署

    #带数字事命令,下面是注释#  

    1  vim /etc/sysconfig/network-scripts/ifcfg-eth0

    更改网卡设置,IPADDR=192.168.1.1 NETMASK=255.255.255.0

       2  service network restart

    重启网卡

       3  ifconfig eth0

    查看网卡是否更改正确

       4  tar zxvf httpd-2.2.15.tar.gz -C /usr/src/

    解压httpd压缩包到/usr/src。

       6  ./configure --prefix=/usr/local/httpd --enable-so

            --enable-rewrite --enable-charset-lite --enable-cgi

    配置:分别是指定安装目录,动态加载模块,网页地址重写,字符集支持,cgi脚本支持。

       7  make

    编译

       8  make install

    编译安装

       9  ln -s /usr/local/httpd/bin/* /usr/local/bin/

    优化配置路径,

       10  ls -l /usr/local/bin/httpd /usr/local/bin/apachectl

    查看目录

       11  cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd

    拷贝阿帕奇服务到init.d。

       12  chmod +x /etc/init.d/httpd

    给这个目录设置执行权限

       13  vim /etc/init.d/httpd

    #chkconfig: 2345 25 25

    #description (描述服务)

       14  chkconfig httpd on

    开启默认启动级别

       15  links --dump http://192.168.1.1

    访问服务器,出现it work就是成功了

       16  service httpd restart

     重启服务

       17  tar -zxvf awstats-7.3.tar.gz -C /usr/src/

    解压缩awstats这个文件

       18  cp -r awstats-7.3/ /usr/local/awstats

    拷贝这个包到/usr/local/awstats。

       19  cd /usr/local/awstats/

    转到这个目录

       20  ls

    查看

       21  cd tools/

    转到tools

       22  chmod +x awstats_configure.pl awstats_updateall.pl

    给这两个文件添加执行权限

      

       23  ./awstats_configure.pl

    执行这个文件

       24  Config file path ('none' to skip web server setup):> /usr/local/httpd/conf/httpd.conf

    添加主配置文件。按照提示进行,添加域名为www.lilk.com。

       25  vim /etc/awstats/awstats.www.lilk.com.conf

    修改站点统计配置文件:logfile=‘usr/local/httpd/logs/access_log'

       26  mkdir /var/lib/awstats

    创建这个文件夹

       22  crontab -e

    创建人物计划表

       23  service crond restart

    重启任务计划表

       24  chkconfig --add crond

    加入任务计划表到启动文件

       25  chkconfig crond on

    开启默认启动级别

       26  vim /etc/hosts

    更改host文件访问web【可搭建dns】

       28  firefox http://www.lilk.com/awstats/awstats.pl

    用火狐访问文件查看日志信息。

  • 相关阅读:
    WTL自绘表指针
    QQ日志搬家工具 1.0
    一个消失很久的首页
    共享.net PE文件结构浏览器+名称混淆 + 16进制结构图 (源码)
    JavaScript中Array 对象相关的几个方法
    ASP.NET底层架构
    ASP.NET 2.0 正式版中无刷新页面的开发
    ASP.NET组件设计Step by Step(9)
    ASP.NET组件设计Step by Step(8)
    ajax上传(xmlhttp上传文件突破大小限制)
  • 原文地址:https://www.cnblogs.com/chenwz/p/7587410.html
Copyright © 2011-2022 走看看