ubuntu10下安装apache

1.     上传apache安装文件到服务器上

2.    chmod 755  httpd-2.2.16.tar.gz

3.    解压文件。tar -xzvf httpd-2.2.16.tar.gz

4.    编译,安装。./configure --with-layout=Apache --prefix=/opt/httpd-2.2.16 --enable-module=most --enable-mods-shared=most --enable-deflate  --enable-module=so  --enable-expires --enable-module=rewrite --enable-dav ; make ; make install

5.    linkusr目录下。如:cd /usr;ln -s /opt/httpd-2.2.16 apache

6.    配置日志。每天写一个文件,定时删除7天以前的日志.如:vi  /usr/apache/conf/httpd.conf

1.     ErrorLog "|/usr/apache/bin/rotatelogs /usr/apache/logs/error_log.%Y%m%d 86400 480"

CustomLog "|/usr/apache/bin/rotatelogs /usr/apache/logs/access_log.%Y%m%d 86400 480" combined

JkLogFile "|/usr/apache/bin/rotatelogs /usr/apache/logs/jk_log.%Y%m%d 86400 480"

 

7.    .configure可能出现的错误:

configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

解决方法:apt-get install zlib1g-dev

 

 

 

  

 

    

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值