环境 CentOS 5.5 32bit
卸载自带httpd(apache)
当我们想卸载httpd 的时候,使用rpm -qa httpd 的时候,我们发现有很多的依赖包。我们耐心的想一个一个的卸载的时候(使用rpm -e httpd-*),还会进入死循环。
解决的办法是:使用 rpm -e httpd-* --nodeps
说明:“*”是通配符。
安装apache
wget http://archive.apache.org/dist/httpd/httpd-2.2.8.tar.gz
tar -zxvf httpd-2.2.8.tar.gz
./configure --prefix=/usr/local/apache
make&&make install
apache 配置文件检查
- # /usr/local/apache/bin/apachectl -t
httpd: apr_sockaddr_info_get() failed for nagios
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
apache 守护进程启动
- # /usr/local/apache/bin/apachectl start
访问服务器,运行正常的话显示
It works!
修改环境变量,方便调用apachectl 命令
- export PATH=$PATH:/usr/local/apache/bin
添加
export PATH=$PATH:/usr/local/apache/bin
- # source /etc/profile
- # apachectl start
httpd: apr_sockaddr_info_get() failed for nagios
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd (pid 6459) already running
转载于:https://blog.51cto.com/55348/1156348