1.下载
http://apache.fayea.com/httpd/
选择
httpd-2.2.32.tar.bz2
2.解压
tar jxvf httpd-2.2.32.tar.bz2
3.编译及安装
cd httpd-2.2.32/
./configure --prefix=/share/http/apache2.2.32-install
make
sudo make install
注意./configure --prefix=指定安装到的目标目录
4.启动
编辑/share/http/apache2.2.32-install/conf/httpd.conf
把Listen端口改成8080
cd /share/http/apache2.2.32-install/bin
启动
./httpd -k restart
我这里遇到了如下错误
httpd: Could not reliably determine the server's fully qualified domain name,using 127.0.1.1 for ServerName
解决方法:
/share/http/apache2.2.32-install/conf/httpd.conf 加入一句 ServerName localhost:80
然后重新运行
cd /share/http/apache2.2.32-install/bin
./httpd -k restart
我的服务器IP是192.168.1.211局域网
5.安装成功
原文链接:https://www.f2er.com/ubuntu/352367.html