安装 apr apr-until prce 安装apache的依赖程序。 https://www.cnblogs.com/visec479/p/5160297.html
[root@Office-test-007113 tools]# wget http://mirrors.shu.edu.cn/apache/httpd/httpd-2.4.29.tar.gz 下载apache软件包
[root@Office-test-007113 tools]# mkdir -p /application/apache2.4.29
[root@Office-test-007113 tools]#tar -zxvf httpd-2.4.29.tar.gz
[root@Office-test-007113 tools]# cd httpd-2.4.29
[root@Office-test-007113 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
[root@Office-test-007113 httpd-2.4.29]#make 编译 [root@Office-test-007113 httpd-2.4.29]#make install 安装 [root@Office-test-007113 httpd-2.4.29]# cd /application/ 切换目录
[root@Office-test-007113 application]# ln -s /application/apache2.4.29/ /application/apache 添加软连接 [root@Office-test-007113 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 [root@Office-test-007113 application]# [root@Office-test-007113 application]# /application/apache/bin/apachectl start 启动apache [root@Office-test-007113 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 [root@Office-test-007113 application]# /etc/init.d/iptables stop 关闭防火墙,用浏览器访问电脑,看是否可以访问。 [root@Office-test-007113 application]#