【Linux】Apache安装

1、找到www.apache.org找到httpd下载源

2、wget 下载地址
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.32.tar.gz

3、解压
tar xf httpd-2.2.32.tar.gz
cd httpd-2.2.32

yum install zlib zlib-devel gcc -y

4、安装Apache步骤命令:
./configure \
--prefix=/application/apache \
--enable-deflate \
--enable-expires \
--enable-headers \
--enable-modules=most \
--enable-so \
--with-mpm=worker \
--enable-rewrite 


错误:checking for zlib location... not found
checking whether to enable mod_deflate... configure:
error: mod_deflate has been requested but can not be built due to prerequisite failures


解决方法:yum install zlib zlib-devel -y

5、源代码安装
make

6、生成文件
make install

如果不成功,关闭防火墙
/etc/init.d/iptables stop

因为在保存文件的时候,会打印出很多保存的信息,所以,为了方便,我们可以通过输入查看错误命名,来看安装过程是否报错
echo $?
如果安装成功,返回 0 。

猜你喜欢

转载自blog.csdn.net/wkx18330698534/article/details/80145577
今日推荐