美文网首页
linux下安装Apache

linux下安装Apache

作者: iEpacJ | 来源:发表于2016-06-02 11:12 被阅读59次

linux下安装Apache

1 - 下载Apache

wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz

2 - 安装Apache

> tar zxf 
> cd 
> ./configure --prefix=/usr/local

执行./configure的时候报错:

checking for APR... no  
configure: error: APR not found .  Please read the documentation

3 - 安装APR

> wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz
> cd apr-1.5.2
> ./configure --prefix=/usr/local

报如下错:

configure: error: in `/usr/local/apr-1.5.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

需要安装C的编译器:

yum install gcc

总下载量:21 M
Installed size: 39 M
确定吗?[y/N]:y
下载软件包:
(1/9): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm                               |  93 kB     00:00     
(2/9): cpp-4.4.7-17.el6.x86_64.rpm                                       | 3.7 MB     00:43     
(3/9): gcc-4.4.7-17.el6.x86_64.rpm                                       |  10 MB     02:32     
(4/9): glibc-devel-2.12-1.192.el6.x86_64.rpm                             | 988 kB     00:26     
(5/9): glibc-headers-2.12-1.192.el6.x86_64.rpm                           | 617 kB     00:11     
(6/9): kernel-headers-2.6.32-642.1.1.el6.x86_64.rpm                      | 4.4 MB     00:55     
(7/9): libgomp-4.4.7-17.el6.x86_64.rpm                                   | 134 kB     00:01     
(8/9): mpfr-2.4.1-6.el6.x86_64.rpm                                       | 157 kB     00:01     
(9/9): ppl-0.10.2-11.el6.x86_64.rpm                                      | 1.3 MB     00:14     
--------------------------------------------------------------------------------------------
总计                                                              70 kB/s |  21 MB     05:11 

然后再执行:

> ./configure --prefix=/usr/local
> make && make install

4 - 安装apr-util

> wget http://apache.fayea.com//apr/apr-util-1.5.4.tar.gz
> cd apr-util-1.5.4
> ./configure --prefix=/usr/local/ --with-apr=/usr/local/apr-1.5.2
> make && make install

不加--with-apr选项,会报configure: error: APR could not be located. Please use the --with-apr option

5 - 安装pcre

> yum install -y gcc gcc-c++
> ./configure --prefix=/usr/local
> make && make install

6 - 重新编译Apache

> ./configure --prefix=/usr/local
> make && make install

相关文章

  • linux下安装Apache

    linux下安装Apache 1 - 下载Apache 2 - 安装Apache 执行./configure的时候...

  • Linux下安装Apache

    Linux下安装Apache# 20150418 目录## ......什么是httpd ......安装步骤 ....

  • linux下安装apache

    图片服务器上安装一个http服务 软件准备: apr-1.5.2.tar.gz httpd-2.4....

  • Linux系统下安装Apache服务器

    Linux系统下安装Apache服务器 1.第一步命令安装apache: yum install httpd ht...

  • Linux环境下 ab压力测试

    Linux下搭建ab环境 1.安装Apache 2.如果不想安装apache但是又想使用ab命令的话,我们可以直接...

  • LAMP安装教程

    Linux配置 安装wget 更新linux库 安装vim 安装zip和unzip 配置显示 安装Apache 安...

  • LAMP安装(1)

    LAMP,就是在linux环境下安装apache(httpd),mysql(mariadb),与php wget ...

  • Linux下安装Apache,PHP

    下载Apache和PHP的源码不用说。 Apache安装: 进入tar.gz解压出来的文件夹,如果直接./conf...

  • Linux下apache的安装

    1.获取软件: http://httpd.apache.org/ httpd-2.4.25.tar.gz 并上传至...

  • linux下安装apache环境

    具体安装步骤: 1 下载想要安装的版本源码包并且配置安装apache的基础环境2 解压,预编译,编译,安装3 启动...

网友评论

      本文标题:linux下安装Apache

      本文链接:https://www.haomeiwen.com/subject/edqkdttx.html