apache源码安装 转载
1.先进入/usr/local/中创建三个文件夹 apr apr-util apache
cd /usr/local目录
mkdir apr
mkdir apr-util
mkdir apache

2.再进入 src中 cd src
3.在 src中 下载apr-1.6.5 apr-util-1.6.1 httpd-2.4.37源码包
wget http://archive.apache.org/dist/apr/apr-1.6.5.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz
wget http://archive.apache.org/dist/httpd/httpd-2.4.37.tar.gz
4.分别解压它们
tar -zxvf apr-1.6.5.tar.gz
tar -zxvf apr-util-1.6.1.tar.gz
tar -zxvf httpd-2.4.37.tar.gz

5. 先不要急着安装,先确保它所依赖的库是否有,怎样查看软件是否安装(rpm -q xxx),如果没有安装依赖则进行安装(笔者一般安装依赖库直接使用yum 默认安装,这样在软件安装的时候就不需要知道依赖库的安装路径,省去不少麻烦)
需要安装的依赖包有 gcc expat-devel openssl-devel pcre pcre-devel

在src目录下 yum install gcc
yum install -y expat-devel
yum install openssl-devel
yum install -y pcre pcre-devel
yum install pcre-devel
6.接下来就是编译安装了,步骤四步: 下载wget --- 加压tar ------ 编译 make ----安装 make install
进入 apr-1.6.5目录中
cd apr-1.6.5
./configure --prefix=/usr/local/apr/
make && make install
(此时没有报任何error错误)
7. 退出apr-1.6.5目录,进入 apr-util-1.6.1目录中

cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make && make install
(此时也没有任何error错误)
8.下面开始对Apache进行安装配置,可以使用

cd httpd-2.4.37
./configure \
--prefix=/usr/local/apache/ \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util/ \
--enable-so \
--enable-ssl\
--enable-deflate=shared \
--enable-expires=shared \
--enable-rewrite=shared \
--enable-static-support
检查无误,然后开始编译安装
make && make install
9.等安装完以后进入到安装目录,开启apache服务
cd /usr/local/apache/bin/
./apachectl start
10. 哎,发现报错
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
额,原来就是配置文件中没有serverName,那就在httpd.conf 中增加 ServerName
11. vim /usr/local/apache/conf/httpd.conf
#增加
ServerName wx.xxxx.club (就是增加域名)

12. 完了之后再重新启动apache,发现一切正常,然后我们访问下看看是否OK


当输入域名时显示it works! ,就表示apache源码安装就此完成,
记住 想要重启apache 必须切换到
cd /usr/local/apache/bin/ 目录
使用
./apachectl start 开启apache
./apachectl restart 重启apache
./apachectl configtest 检测apache配置文件语法是否正确

apache源码安装 转载的更多相关文章
- apache源码安装必须依赖的库apr----/etc/ld.so.conf 文件介绍
Apache所依赖的库,封装了各个系统相关的API等.虽然都是Apache开发的,但是现在最新版本的Apache和APR源码是分开的.要编Apache就必须使用APR. /etc/ld.so.conf ...
- Apache源码安装--httpd-2.2.34
一.下载源码包 二.将源码包移动/usr/src/目录 三.解压源码包,并进入目录:tar -xzvf httpd-2.2.34.tar.gz,cd httpd-2.2.34 四.安装依赖包:yum ...
- centos apache源码安装过程记录
1.下载相关源文件 wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.4.18.tar.gzwget http://mirrors.hust.ed ...
- win7 php5.5 apache 源码安装 imagick扩展
最近公司项目有用到php 的imagick,折腾了好长时间才把扩展装上,最主要的就是最新的不一定是最合适的,最开始一直找最新包安装,一直都不成功,经过google了好长时间,终于找到一个有用的,灵机一 ...
- Apache 源码安装
8.20]# make[root@yahoo pcre-8.20]# make install 二.安装apache1.下载httpd-2.4.3.tar.gz,地址是:http://httpd.ap ...
- apache源码安装
1.apr和apr-util,下载地址: http://apr.apache.org/download.cgi yum install gcc yum install libtool yum inst ...
- linux下源码安装apache服务
1.搭建静态网站是,我们只需要搭建apache服务即可满足要求. 例如:如果我再客户端游览器输入地址,他会找到192.168.1.100这个服务器,然后根据端口会找到apache服务器.apache他 ...
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境【转载】
本文转载自 园友David_Tang的博客,如有侵权请联系本人及时删除,原文地址: http://www.cnblogs.com/mchina/archive/2012/11/28/2778779.h ...
- 烂泥:php5.6源码安装与apache集成
本文由秀依林枫提供友情赞助,首发于烂泥行天下. apache对php的支持是通过apache的mod_php5模块来支持的,这点与nginx不同.nginx是通过第三方的fastcgi处理器才可以对p ...
随机推荐
- xampp for mac配置局域网访问
下载了xampp,之前在window上面经常用.后来用了mac下载xampp后,配置局域网总是没成功.现在配置好了,来和大家分享一下配置局域网访问步骤. 1. 下载 下载地址:https://www. ...
- react如何通过shouldComponentUpdate来减少重复渲染
转自:https://segmentfault.com/a/1190000016494335 在react开发中,经常会遇到组件重复渲染的问题,父组件一个state的变化,就会导致以该组件的所有子组件 ...
- jenkins自动部署代码到多台服务器
下面讲一下如何通过一台jenkins服务器构建后将代码分发到其他的远程服务器,即jenkins自动部署代码到多台服务器. 1.下载 pulish over ssh 插件 2.系统管理 -> 系统 ...
- 如何删掉git版本库master分支的第一个commit
这个操作会将库清空,一般来说在建库开始的时候操作. 适用场景: git init初始化版本库之后,提交第一个点之后发现这个点出问题了,但是此时内心如果有洁癖的话, 你会觉得不完美,很想把这个点干掉重来 ...
- Summer training round2 #9(Training28)
A:签到题 C:模拟搜索题 #include <bits/stdc++.h> #include <cstring> #include <iostream> #inc ...
- java代码调用exe(cmd命令)
public class ShellCommand{ public static void execCmd(String cmd, boolean wait) { execC ...
- 并查集+时光倒流 || [JSOI2008]星球大战starwar || BZOJ 1015 || Luogu P1197
题面:P1197 [JSOI2008]星球大战 题解: 坑点有点多啊,加上我本来就有点头昏脑涨,一道水题写了一万年.. 并查集不支持拆开(但是可以撤销合并),只支持合并.所以把询问离线了,从最后状态到 ...
- 使用Vue自定义组件时,报did you register the component correctly? For recursive components, make sure to provide the "name" option.(未注册组件)的原因之一
错误信息: [Vue warn]: Unknown custom element: <list> - did you register the component correctly? F ...
- 编程语言类别;运行Python程序的方式;变量和常量;Python程序的垃圾回收机制;
目录 编程语言分类 运行Python程序的两种方式 1.交互式 变量与常量 1.变量 2.常量 3.小整数池 垃圾回收机制 编程语言分类 编程语言分为: 1.机器语言:直接用二进制的0和1和计算机(C ...
- C# 扩展方法——获得枚举的Description
其他扩展方法详见:https://www.cnblogs.com/zhuanjiao/p/12060937.html /// <summary> /// 扩展方法,获得枚举的Descrip ...