下载文件 apache安装包:Download - The Apache HTTP Server Project
解压文件到/usr/src:tar xf /root/httpd-2.2.15.tar.gz -C /usr/src/
到此文件夹下:cd /usr/src/httpd-2.2.15/
配置安装路径:./configure --prefix=/usr/local/httpd
编译&&编译安装:make && make install
优化执行路径:ln -s /usr/local/httpd/bin/apachectl /usr/bin/
开启服务:apachectl start
浏览器访问127.0.0.1(出现以下界面,说明apache服务已开启)