安装Apache源码包:
1 解压生成编译配置文件
检查gcc
没有安装gcc:yum -y install gcc*
tar xzf 压缩包
./configure --prefix=/usr/local/apache2/ --sysconfdir=/usr/local/apache2/etc/ --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared
2.进行编译(把c编译成执行程序)
make
3.进行安装
make install
启动服务时候如果报错
httpd: Could not reliably determine the server's fully qualified domain name
解决办法:vim /usr/local/apache2/etc/httpd.conf
重新启动
/usr/local/apache2/bin/apachectl start/restart