(一)Apache 的安装

# /usr/sbin/groupadd -g 48 apache
# /usr/sbin/useradd -g 48 -u 48 -M -d /usr/local/httpd/htdocs -s /sbin/nologin apache

# /usr/sbin/groupadd -g 1000 vgroup
# /usr/sbin/useradd -g 1000 -u 1000 -M -s /bin/false vuser

# tar zxvf httpd-2.2.14.tar.gz
# cd httpd-2.2.14

# ./configure --prefix=/usr/local/httpd --enable-modules=all --enable-mods-shared=all --enable-so --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-htpasswd --enable-static-htdigest --enable-static-rotatelogs --enable-static-logresolve --enable-static-htdbm --enable-static-ab --enable-static-checkgid --enable-cgid --enable-cgi --disable-userdir --with-mpm=worker --with-pcre=/usr/bin/pcre-config --with-apr=/usr/bin/apr-1-config --with-apr-util=/usr/bin/apu-1-config --enable-ssl --enable-suexec --with-suexec-uidmin=500 --with-suexec-gidmin=100 --with-suexec-caller=apache --with-suexec-docroot=/usr/local/httpd --with-suexec-bin=/usr/local/httpd/bin/suexec --with-suexec-logfile=/usr/local/httpd/logs/suexec_log

# make
# make install

# cd ..
# rm -rf httpd-2.2.14

# cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/httpd
# chmod 700 /etc/rc.d/init.d/httpd

# cd /usr/local/httpd/conf

把装好的 Apache 的默认使用用户,和使用组更改为 apache :

# sed -i -e "s/User daemon/User apache/" -e "s/Group daemon/Group apache/" httpd.conf

# /etc/rc.d/init.d/httpd start

| 引用(0)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]