安装 apr apr-until prce 安装apache的依赖程序。
https://www.cnblogs.com/visec479/p/5160297.html
[[email protected] tools]# wget http://mirrors.shu.edu.cn/apache/httpd/httpd-2.4.29.tar.gz 下载apache软件包
[[email protected] tools]# mkdir -p /application/apache2.4.29
[[email protected] tools]#tar -zxvf httpd-2.4.29.tar.gz
[[email protected] tools]# cd httpd-2.4.29
[[email protected] httpd-2.4.29]# ./configure \
--prefix=/application/apache2.4.29 \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/ \
--with-pcre=/usr/local/pcre \
--enable-deflate \
--enable-expires \
--enable-headers \
--enable-modules=most \
--enable-so \
--with-mpm=worker \
--enable-rewrite
[[email protected] httpd-2.4.29]#make 编译
[[email protected] httpd-2.4.29]#make install 安装
[[email protected] httpd-2.4.29]# cd /application/ 切换目录
[[email protected] application]# ln -s /application/apache2.4.29/ /application/apache 添加软连接
[[email protected] application]# ll /application/
total 4
lrwxrwxrwx. 1 root root 25 Apr 3 21:24 apache -> /application/apache2.4.29
drwxr-xr-x. 14 root root 4096 Apr 3 21:34 apache2.4.29
[[email protected] application]#
[[email protected] application]# /application/apache/bin/apachectl start 启动apache
[[email protected] application]# ps -ef |grep http 检查apache的启动
root 32129 1 0 21:29 ? 00:00:00 /application/apache2.4.29/bin/httpd -k start
daemon 32130 32129 0 21:29 ? 00:00:00 /application/apache2.4.29/bin/httpd -k start
daemon 32131 32129 0 21:29 ? 00:00:00 /application/apache2.4.29/bin/httpd -k start
daemon 32132 32129 0 21:29 ? 00:00:00 /application/apache2.4.29/bin/httpd -k start
root 32233 1207 0 21:35 pts/0 00:00:00 grep http
[[email protected] application]# /etc/init.d/iptables stop 关闭防火墙,用浏览器访问电脑,看是否可以访问。
[[email protected] application]#
原文地址:http://blog.51cto.com/993960/2094453