手动编译httpd-2.4.25

系统:CentOS7.1810

httpd:2.4.25

编译时报错解决技巧:报什么错,就装这个错误的devel,比如报http2错误,就yum search http2,找到libnghttp2-devel,然后yum install libnghttp2-devel再重新configure

# 配置EPEL源,有些包只有epel源有

[root@centos7 ~]# cat /etc/yum.repos.d/epel.repo
[epel]
name=aliyun epel
baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7
enabled=1

一、下载地址:

https://www.lanzous.com/i5csh0h

http://archive.apache.org/dist/httpd/httpd-2.4.25.tar.bz2

二、安装依赖

[root@imooc-nginx ~]# yum install gcc openssl-devel pcre-devel apr-devel apr-utils-devel libnghttp2-devel ncurses-devel

三、解压

[root@imooc-nginx ~]# bzip2 -d httpd-2.4.25.tar.bz2
[root@imooc-nginx ~]# tar xf httpd-2.4.25.tar

四、开始编译

[root@imooc-nginx ~]# cd httpd-2.4.25/
[root@imooc-nginx httpd-2.4.25]# ./configure \
--prefix=/apps/httpd24 \
--sysconfdir=/etc/httpd \
--enable-http2 \
--disable-auth-basic \
--enable-ssl \
--enable-so

五、根据Makefile,构建应用程序

[root@imooc-nginx httpd-2.4.25]# make
# make -j 2 #可以多线程编译,根据CPU个数写

六、make install

# 拷贝文件
[root@imooc-nginx httpd-2.4.25]# make install

七、启动apache

可以考虑加PATH变量或做软链接

[root@imooc-nginx httpd-2.4.25]# /apps/httpd24/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe4d:5986. Set the 'ServerName' directive globally to suppress this message

八、测试访问

主页内容:/apps/httpd24/htdocs/index.html

root@ubutnu:~# curl -q http://172.18.145.106
<html><body><h1>It works!</h1></body></html>

九、让httpd开机自启

[root@imooc-nginx httpd-2.4.25]# vim /etc/rc.d/rc.local
[root@imooc-nginx httpd-2.4.25]# tail -1 /etc/rc.d/rc.local
/apps/httpd24/bin/apachectl start
[root@imooc-nginx httpd-2.4.25]# chmod +x /etc/rc.d/rc.local

CentOS7.6手动编译httpd-2.4.25的更多相关文章

  1. centos7.0 手动编译 lamp环境

    首先新建用户 lamper,并添加 sodu权限 两种方法:is not in the sudoers file 解决(转) xx is not in the sudoers file 问题解决[转载 ...

  2. 在centos7中手动编译greenplum

    一.编译环境 Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 2014 ...

  3. centos7手动编译安装Libvirt常见问题

    由于功能需要,体验了手动编译安装Libvrt,还是碰到了不少问题,这里总结如下仅限于centos7: 1.configure: error: You must install the pciacces ...

  4. Centos7 手动编译 RabbitMQ ,并安装php amqp

    RabbitMQ是一个在AMQP基础上完成的,可复用的企业消息系统,底层基于Erlang语言. 一:centos7安装RabbitMQ 这玩意儿安装很扯淡,官方推荐rpm安装,rpm安装本身是最简单的 ...

  5. 手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)

    在平时运维工作中,经常需要用到LNMP应用框架.LNMP环境是指在Linux系统下,由Nginx + MySQL + PHP组成的网站服务器架构. 可参考前面的文章: 如何在CentOS 7上搭建LA ...

  6. centos7源码编译安装lamp/lnmp

    centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...

  7. 转载:Centos7 从零编译配置Memcached

    序言 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度. Memca ...

  8. 转载:Centos7 从零编译Nginx+PHP+MySql 二

    序言 这次玩次狠得.除了编译器使用yum安装,其他全部手动编译.哼~ 看似就Nginx.PHP.MySql三个东东,但是它们太尼玛依赖别人了. 没办法,想用它们就得老老实实给它们提供想要的东西. 首先 ...

  9. 转载:Centos7 从零编译Nginx+PHP+MySql 序言 一

    这次玩次狠得.除了编译器使用yum安装,其他全部手动编译.哼~ 看似就Nginx.PHP.MySql三个东东,但是它们太尼玛依赖别人了. 没办法,想用它们就得老老实实给它们提供想要的东西. 首先的一些 ...

随机推荐

  1. vue中图片放大镜功能

    仿淘宝详情页图片鼠标移过去可对图片放大显示在右侧 效果图如下图,此功能支持PC端与移动端 接下来进入代码实现环节: 先准备两张图片,一张小图片叫 '土味.jpg',大小160*91:一张大图片叫 ' ...

  2. vue事件获取当前对象

    一.事件传参 如点击事件 <div @click='click'> <div> <div @click='click_1('msg')'> <div> ...

  3. MYSQL事件隔离级别以及复读,幻读,脏读的理解

    一.mysql事件隔离级别 1未提交读(READUNCOMMITTED) 另一个事务修改了数据,但尚未提交,而本事务中的SELECT会读到这些未被提交的数据(脏读)( 隔离级别最低,并发性能高 ) 2 ...

  4. 实验吧之【你真的会PHP吗?】

    你真的会PHP吗? 首先刚进网页就是一个have fun  看了源码没有什么提示,也没有输入框,那就打开F12看看 有提示 6c525af4059b4fe7d8c33a.txt 访问 http://c ...

  5. 当前机器的各种进程、服务信息的收集(win)

    当前机器的各种进程.服务信息的收集(win) 前言 我们在做渗透测试的过程中,遇到Windows系统的环境是最多的,然而在拿到一台Windows胸膛呢权限之后,我们要进行横向渗透测试或者纵向渗透测试, ...

  6. Android Studio 1.5运行问题

    Error:Unable to start the daemon process: could not reserve enough space for object heap.Please assi ...

  7. C#读取邮件附件的方法

    基于需求需要从邮件里读取附件,从网络搜索整理如下: 1 使用 Spire.Email 从官网下载安装并引用,地址:https://www.e-iceblue.com/Download/email-fo ...

  8. opencv::Canny边缘检测

    Canny算法介绍 五步 in cv::Canny 高斯模糊 - GaussianBlur 灰度转换 - cvtColor 计算梯度 – Sobel/Scharr 非最大信号抑制 高低阈值输出二值图像 ...

  9. Libevent::evhttp服务器

    #include <cstdio> #include <stdio.h> #include <stdlib.h> #include <string.h> ...

  10. 推荐几个IT交流社区

    博客园,csdn,掘金,StackOverflow(境外),v2ex,开源中国,简书,头条