一. CentOS5下安装Apahce服务器
1. 下载
下载以下文件:
httpd-2.2.4.tar.gz
将这个文件放入/user/local目录中,并开始安装。
2.安装
#tar zxvf httpd-2.2.4.tar.gz
#cd httpd-2.2.4
#./configure --enable-module=so --enable-dav --enable-dav-fs --enable-so --prefix=/usr/local/apache2 --enable-ssl --with-ssl --enable-track-vars --enable-rewrite --with-z-dir --enable-mods-shared=most (加上SVN模块)
#make
#make install
错误提示:在启动httpd的时候提示错误信息的,但仍可以启动成功。
Starting httpd: httpd: apr_sockaddr_info_get() failed for MYHOST
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.
可用以下办法解决
#vi /etc/hosts
127.0.0.1 localhost.localdomain localhost MYHOSTNAME
#vi /etc/sysconfig/network
HOSTNAME= MYHOSTNAME
#vi /usr/local/apache2/conf/httpd.conf
ServerName MYHOSTNAME:80