Linux配置Apache服务器全攻略Linux认证考试
文章作者 100test 发表时间 2010:04:15 20:14:24
来源 100Test.Com百考试题网
    
	
  一,使用源代码安装
  (1) 获得源代码
  # lynx http://www.apache.org/dist/httpd/httpd-2_0_NN.tar.gz
  NN表示当前所用的版本号。
  (2) 解压缩
  # gzip -d httpd-2_0_NN.tar.gz
  # tar xvf httpd-2_0_NN.tar
  (3) 配置.
  # ./configure --prefix= /usr/local/apache --enable-so
  表示Apache将安装在/usr/local/apache目录下
  (4) 编译与安装
  # make
  # make install
  (5) 测试
  # /usr/local/apache/bin/apachectl start
  二,使用RPM包安装
  # rpm —ivh apache-*.rpm
  完成安装后,配置文件在/etc/httpd/conf/目录下,文件根目录为/var/www/html,工具文件在/etc/rc.d/init.d/目录下,日志文件在/var/log/httpd/目录下。
  第三站 Apache 2.0的配置
  Apache 2.0的主配置文件为httpd.conf。如果以上述源代码安装则配置文件保存在/usr/local/apache/conf/目录下,若以RPM包方式安装则配置文件保存在/etc/httpd/conf/目录下。我们可以直接修改httpd.conf文件也可以用redhat linux 9自带的图形化工具来配置。打开启动程序-