码迷,mamicode.com
首页 > Web开发 > 详细

源码安装apache 2.4.29

时间:2018-04-04 00:02:57      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:apache 2.4.29

安装 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]#

源码安装apache 2.4.29

标签:apache 2.4.29

原文地址:http://blog.51cto.com/993960/2094453

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!