1 软件下载地址:http://httpd.apache.org/
2 将下载好的httpd-2.2.34.tar.bz2包解压到 /usr/local/src/httpd-2.2.34
– # tar xvf httpd-2.2.34.tar.bz2
3 编译安装http,指定安装路径: –prefix=/app/httpd-22 配置文件的路径:–sysconfdir=/etc/httpd22
– #./configure –prefix=/app/httpd22/ –sysconfdir=/etc/httpd22/
4 检查依赖文件的时候可能出现缺少的依赖文件,只需要yum安装所缺少的文件就行,通常在缺少文件的后面加上devel,此步骤可能持续多次
– # yum install 缺少文件-devel
5 再次检查
– #./configure –prefix=/app/httpd22/ –sysconfdir=/etc/httpd22/
6 编译安装
– # make
– # make install
7 配置httpd二进制程序的PATH环境变量
– # echo ‘export PATH=/app/httpd22/bin:$PATH’ > /etc/profile.d/httpd22.sh
8导出man文件
– # vim /etc/man.config
MANPATH /app/http22/man
9启动该Http Server并查看80端口是否打开成功
– # apachectl start
– # ss -ntl
10验证
– http://Centos的IP地址/ 会在网页里显示 It works!
原创文章,作者:oranix,如若转载,请注明出处:http://www.178linux.com/83781