ubuntu10下安装apache

来源:互联网 发布:stata软件怎么下载 编辑:程序博客网 时间:2024/05/16 15:06

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

 

 

 

  

 

    

原创粉丝点击