wiflish
Loving Life! Loving Coding!
posts - 98,comments - 98,trackbacks - 0

参考:http://www.extmail.org/forum/archive/2/0510/563.html

下载Apache 2.0.59的源代码:http://www.apache.org/dist/httpd/
增加Apache运行所需的用户和组:
groupadd httpd
useradd httpd -g httpd -c "Apache user" -d /nonexistent -s /sbin/nologin

安装Apache,Apache将被安装在"/usr/local/apache2"目录下:

tar zxvf httpd-2.0.59.tar.gz
cd httpd-2.0.59

./configure --prefix=/usr/local/apache2 --enable-so --enable-ssl --with-mpm=worker --enable-rewrite --enable-suexec --with-suexec-caller=httpd \
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"

make
make install

修改apache的配置文件(/usr/local/apache2/conf/httpd.conf),配置apache的默认语言、运行用户等参数:
User httpd
Group httpd
<IfModule worker.c>
StartServers     10
MaxClients       1024
MinSpareThreads   100
MaxSpareThreads   800
ThreadsPerChild   64
MaxRequestsPerChild 0
</IfModule>
在"/etc/rc.local"文件中增加"/usr/local/apache2/bin/apachectl start",设置Apache开机自动运行。

posted on 2006-11-30 15:24 想飞的鱼 阅读(251) 评论(0)  编辑  收藏 所属分类: linux

只有注册用户登录后才能发表评论。


网站导航: