yum install gcc gcc-c++ glibc glibc-devel
1、编译安装Apache2.2
wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.2.34.tar.gz
tar xvf httpd-2.2.34.tar.gz
cd httpd-2.2.34
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite
make
make install
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
/etc/init.d/httpd start 启动apache
ps -ef |grep httpd 查看是否启动
service iptables stop 关闭防火墙,不然从外面无法访问apache
查看本服务器的ip地址,在其他电脑的浏览器地址栏输入该ip地址,显示:It works! 则表示安装成功。