# 安装
# cd /usr/local/src # wget http://mirrors.hust.edu.cn/apache//httpd/httpd-2.2.31.tar.gz # tar zxvf httpd-2.2.31.tar.gz # cd httpd-2.2.31 # ./configure --prefix=/usr/local/src/apache # make && make install
修改配置指定service
# cp /usr/local/src/apache/bin/apachectl /etc/init.d/httpd # vim /etc/init.d/httpd
修改第二行,在第二行添加
# chkconfig:- 85 15 # description: Apache is a World Wode Web server.It is used to server # HTML files and CGI
修改httpd.conf
# vim /usr/local/src/apache/conf/httpd.conf
添加
ServerName localhost:80
启动
# service httpd start