服务器 频道

Apache 2.0.55 安装步骤

  【IT168 服务器学院】Apache 2.0.55
  1.        下载链接:http://www.apache.org/dist/httpd/  (最新版本)

         http://archive.apache.org/dist/httpd/ (历史版本)

  2.        安装步骤:

  #解压缩源代码

  cd /usr/local/pkgs

  tar zxvf httpd-2.0.55.tar.gz

  cd httpd-2.0.50

  #根据需要,修改server/mpm/worker/worker.c,设置worker MPM模块的相关默认参数。

  #建议使用worker类型的MPM(多道处理模块)。

  #开始编译安装

  export CHOST="i686-pc-linux-gnu"

  export CFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -msse -mmmx  -mfpmath=sse"

  export CXXFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer -msse -mmmx  -mfpmath=sse"

  ./configure --prefix=/usr/local/apache2 \

  --with-mpm=worker \

  --disable-auth \

  --disable-status \

  --disable-userdir \

  --disable-asis \

  --disable-imap \

  --disable-actions \

  --enable-deflate \

  --enable-so \

  --enable-ssl \

  --with-ssl \

  --enable-rule=SHARED_CORE

  make

  make install

  #添加httpd用户,并设置密码

  useradd httpd

  passwd httpd

  #编辑/usr/local/apache2/conf/httpd.conf,做如下修改。

  #此参数表示Apache以httpd用户身份运行。

  User httpd

  Group httpd

  #在/etc/rc.d/rc.local中,添加如下内容。

  /usr/local/apache2/bin/apachectl start
  

0
相关文章