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

Linux下apache源码安装

时间:2015-07-03 00:31:10      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:linux下apache源码安装

1.安装准备

(1)下载apache安装包

http://archive.apache.org/dist/httpd/

2.下载安装 apache 依赖关联包(共四个:apr,apr-iconv,apr-util,pcre)

http://archive.apache.org/dist/apr/

(1)安装apr

# tar zxvf apr-1.4.6.tar.gz

# cd apr-1.4.6

# ./configure 

# make

# make install

(2)安装apr-iconv

# tar -zxvf apr-iconv-1.2.1.tar.gz

# cd apr-iconv-1.2.1

# ./configure  --with-apr=/usr/local/apr

# make

# make install

(3)安装apr-util

# tar -zxvf apr-util-1.5.4.tar.gz

# cd apr-util-1.5.4

# ./configure  --with-apr=/usr/local/apr

# make

# make install

(4)安装pcre

http://sourceforge.net/projects/pcre

# tar -zxvf pcre-8.37.tar.gz

# cd pcre-8.37

# ./configure  

# make

# make install

3.安装apache

# tar -zxvf httpd-2.4.9.tar.gz

# cd httpd-2.4.9

# ./configure  --prefix=/usr/local/apache2

# make

# make install

启动 apache

# /usr/local/web/apache/bin/apachectl start

关闭防火墙

# service iptables stop


在浏览器里输入:http://主机IP地址 就可以看到结果了


注意安装相关依赖包,根据步骤查看执行结果是否有错误。


本文出自 “Home_Tang” 博客,请务必保留此出处http://yagetang.blog.51cto.com/1780698/1670244

Linux下apache源码安装

标签:linux下apache源码安装

原文地址:http://yagetang.blog.51cto.com/1780698/1670244

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