版权声明:本文为博主原创文章,未经博主同意不得转载。

https://blog.csdn.net/sundenskyqq/article/details/24733923

PS:Apache http server 须要依赖 apr、apr-util、pcre,所以要先下载和安装这三个东东。

而apr-util和pcre又依赖apr,所以要先安装apr。

 

步骤:

1、  下载apr、apr-util、pcre、Apache httpserver

地址例如以下:

apr/ apr-util: http://apr.apache.org/download.cgi

pcre: http://www.pcre.org/

apache http server: http://httpd.apache.org/download.cgi#apache24

 

2、  将文件上传到服务器(linux)

比如文件夹:/usr/mytest/source

3、  分别解压四个文件

比如解压到当前文件夹:

解压apr : tar –vxf apr-1.5.0.tar.gz(在source文件夹下会多出一个文件夹apr-1.5.0)

解压apr : tar –vxf apr-util-1.5.3.tar.gz(在source文件夹下会多出一个文件夹apr-util-1.5.3)

解压pcre : tar –vxf pcre-8.33.tar.gz(在source文件夹下会多出一个文件夹pcre-8.33)

解压Apache http server:tar –vxf httpd-2.4.9.tar.gz(在source文件夹下会多出一个文件夹httpd-2.4.9)

PS:注意,我下载的都是tar.gz格式的,假设是其它格式的,请參考linux关于解压方面的相关命令。

 

4、  安装apr

切换到apr-1.5.0文件夹下,依次运行命令:

(1)./configure--prefix=/usr/mytest /soft/apr (该命令的意思是配置安装文件。指定安装路径为绝对路径)

(2)make (编译)

(3)make install(安装)

5、  安装apr-util

切换到apr-util-1.5.3文件夹下。依次运行命令:

(1)./configure--prefix=/usr/mytest /soft/apr-util --with-apr=/usr/mytest

/soft/apr/bin/apr-1-config

 (该命令的意思是配置安装文件,指定安装路径为绝对路径。且须要依赖apr。否则将会出错)

(2)make (编译)

(3)make install(安装)

6、  安装pcre

切换到pcre-8.33文件夹下,依次运行命令:

(1)./configure--prefix=/usr/mytest /soft/pcre --with-apr=/usr/mytest

/soft/apr/bin/apr-1-config

 (该命令的意思是配置安装文件。指定安装路径为绝对路径;且须要依赖apr,否则将会出错)

(2)make (编译)

(3)make install(安装)

 

7、  安装Apache httpserver

切换到httpd-2.4.9文件夹下,依次运行命令:

(1)./configure--prefix=/usr/mytest /soft/httpd 

--with-apr=/usr/mytest/soft/apr/bin/apr-1-config  --with-apr=/usr/mytest/soft/apr-util/bin/apu-1-config

--with-apr=/usr/mytest /soft/pcre/bin/pcre-config

 (该命令的意思是配置安装文件,指定安装路径为绝对路径;且须要依赖apr/apr-util/pcre。否则将会出错)

(2)make (编译)

(3)make install(安装)

 

至此安装完毕并结束。

 

8、  启动測试:

(1)    须要首先改动配置文件:(/usr/mytest /soft/httpd/conf/httpd.conf)

ServerName (如127.0.0.1:1025)

Listener  (如127.0.0.1:1025)

PS:假设配置文件里Listen定义的是默认的80port(或1024以下)。那么启动Apache将须要root权限以将它绑定在特权port上。

參考网址:http://www.jinbuguo.com/apache/menu22/invoking.html

 

(2)    切换到/usr/mytest /soft/httpd/bin文件夹下。

运行:./apachectl –k start

(3)    到浏览器中输入ServerName配置的属性值。得到:It  works!

 

9、  共享服务器使用说明:

在httpd/htdocs 文件夹以下添加文件夹、文件等,浏览器中就可以查看。

Apache http server linux 安装过程说明的更多相关文章

  1. 0级搭建类008-Ubuntu Server Linux安装 (18.04.2) 公开

    项目文档引子系列是根据项目原型,制作的测试实验文档,目的是为了提升项目过程中的实际动手能力,打造精品文档AskScuti. 项目文档引子系列目前不对外发布,仅作为博客记录.如学员在实际工作过程中需提前 ...

  2. 持续集成之二:搭建SVN服务器--Apache HTTP Server安装

    安装环境 Red Hat Enterprise Linux Server release 7.3 (Maipo) jdk1.7.0_80 httpd-2.4.35.tar.gz apr-1.6.5.t ...

  3. CentOS 7安装配置Apache HTTP Server

    原文 CentOS 7安装配置Apache HTTP Server   RPM安装httpd # yum -yinstall httpd //安装httpd会自动安装一下依赖包: apr apr-ut ...

  4. 怎样从外网访问内网Apache HTTP Server

    本地安装了一个Apache HTTP Server,只能在局域网内访问,怎样从外网也能访问到本地的Apache HTTP Server呢?本文将介绍具体的实现步骤. 1. 准备工作 1.1 安装并启动 ...

  5. LinuxMint下Apache Http源码安装过程

    1. 源码包下载 Apache Http安装要求必须安装APR.APR-Util.PCRE等包. Apache Http包下载地址:http://httpd.apache.org/download.c ...

  6. Linux 安装 httpd2.4.16

    假设: apr安装在: /opt/httpd/apr apr-util安装在 /opt/httpd/apr-suite/apr-util apr-iconv安装在/opt/httpd/apr-suit ...

  7. Linux下编译安装Apache Http Server

    Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...

  8. Linux下Apache HTTP Server 2.4.20安装

    一.创建software目录 mkdir /softwareer 二.下载apache源码包 wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4 ...

  9. linux安装apache的纠结过程

    本以为linux下安装apache是件很简单的过程.三命令就可以搞定,jxvf解压,make 编译,make install 安装就OK了.没想到这个过程还颇费周折.可能和环境有关吧.先说一下我的环境 ...

随机推荐

  1. m4--宏处理器

    m4 是 POSIX 标准中的一部分,所有版本的 UNIX 下都可用.虽然这种语言可以单独使用,但大多数人需要 m4 仅仅是因为 GNU autoconf 中的 “configure” 脚本依赖它.宏 ...

  2. rsync详解之exclude排除文件

    rsync详解之exclude排除文件 问题:如何避开同步指定的文件夹?  --excludersync  --exclude files and folders http://articles.sl ...

  3. CentOS 6.5 安装 php7 教程 包很重要使用lnmp1.4里面的包

    ./configure \ --prefix=/usr/local/php-7.0.1 \ --with-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \ --wi ...

  4. KMP + 求最小循环节 --- HUST 1010 - The Minimum Length

    The Minimum Length Problem's Link: http://acm.hust.edu.cn/problem/show/1010 Mean: 给你一个字符串,求这个字符串的最小循 ...

  5. C++ 运算符重载二(一元运算符重载)

    //一元运算符重载 #include<iostream> using namespace std; class Point { public: Point(int x,int y){ th ...

  6. 【ML】有偏样本解决方案

    占个位置,得空写文章. From:learning-from-imbalanced-data

  7. PowerShell中的配置文件

    http://www.cnblogs.com/ceachy/archive/2013/03/01/PowerShell_Profile.html

  8. python3----练习题(图片转字符画)

    import argparse from PIL import Image def parse_param(): parser = argparse.ArgumentParser() # 命令行输入参 ...

  9. 分页技巧_改进JSP页面中的公共分页代码_实现分页时可以有自定义的过滤与排序条件

    分页技巧__改进JSP页面中的公共分页代码 自定义过滤条件问题 只有一个url地址不一样写了很多行代码 public>>pageView.jspf添加 分页技巧__实现分页时可以有自定义的 ...

  10. laravel 调试模式及日志配置

    1)调试模式和日志的配置都在 config/app.php 配置文件中 2)打开调试模式 'debug' => env('APP_DEBUG', true) 3)laravel的日志默认已经打开 ...