simon_sg  
安装apache2
  将httpd-2.0.40.tar.gz复制到/usr/local/src目录下
  # tar zxvf httpd-2.0.40.tar.gz
  # cd httpd-2.0.40
  # ./configure --prefix=/usr/local/apache --enable-mods=shared=all --enable-module=so --disable-info
  # make
  # make install
  # vi /usr/local/apache/conf/httpd.conf
  更改ServerName后保存退出
  接下来设置apache的自启动及运行等级
  # cd /etc/rc.d/init.d
  # sed 's/sbin\/atd/local\/apache\/bin\/httpd/g' atd > httpd
  # sed 's/atd/httpd/g' httpd > /tmp/txt
  # sed 's/at daemon/httpd daemon/g' /tmp/txt > httpd
  # rm -f /tmp/txt
  # chmod 755 httpd
  # chkconfig --level 345 httpd on
  # chkconfig --level 0126 httpd off
  启动与关闭httpd服务
  # /etc/rc.d/init.d/httpd start/stop/restart
posted on 2005-05-17 06:15  IT and Living  阅读(68)  评论(0)    收藏  举报