CentOS7.6手动编译httpd-2.4.25
手动编译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的更多相关文章
- centos7.0 手动编译 lamp环境
首先新建用户 lamper,并添加 sodu权限 两种方法:is not in the sudoers file 解决(转) xx is not in the sudoers file 问题解决[转载 ...
- 在centos7中手动编译greenplum
一.编译环境 Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 2014 ...
- centos7手动编译安装Libvirt常见问题
由于功能需要,体验了手动编译安装Libvrt,还是碰到了不少问题,这里总结如下仅限于centos7: 1.configure: error: You must install the pciacces ...
- Centos7 手动编译 RabbitMQ ,并安装php amqp
RabbitMQ是一个在AMQP基础上完成的,可复用的企业消息系统,底层基于Erlang语言. 一:centos7安装RabbitMQ 这玩意儿安装很扯淡,官方推荐rpm安装,rpm安装本身是最简单的 ...
- 手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)
在平时运维工作中,经常需要用到LNMP应用框架.LNMP环境是指在Linux系统下,由Nginx + MySQL + PHP组成的网站服务器架构. 可参考前面的文章: 如何在CentOS 7上搭建LA ...
- centos7源码编译安装lamp/lnmp
centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...
- 转载:Centos7 从零编译配置Memcached
序言 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度. Memca ...
- 转载:Centos7 从零编译Nginx+PHP+MySql 二
序言 这次玩次狠得.除了编译器使用yum安装,其他全部手动编译.哼~ 看似就Nginx.PHP.MySql三个东东,但是它们太尼玛依赖别人了. 没办法,想用它们就得老老实实给它们提供想要的东西. 首先 ...
- 转载:Centos7 从零编译Nginx+PHP+MySql 序言 一
这次玩次狠得.除了编译器使用yum安装,其他全部手动编译.哼~ 看似就Nginx.PHP.MySql三个东东,但是它们太尼玛依赖别人了. 没办法,想用它们就得老老实实给它们提供想要的东西. 首先的一些 ...
随机推荐
- 数据结构(java)
数据结构1.什么是数据结构?数据结构有哪些? 数据结构是指数据在内存中存放的机制. 不同的数据结构在数据的查询,增删该的情况下性能是不一样的. 数据结构是可以模拟业务场景. 常见的数据结构有:栈,队列 ...
- Linux之shell基础
Shell基础 一.shell概述 1) shell是一个命令行解释器,它为用户提供了一个向Linux内核发送请求以便运行程序的界面系统级程序,用户可以用shell来启动.挂起.停止甚至是编写一些程序 ...
- Web安全之URL跳转科普
跳转无非是传递过来的参数未过滤或者过滤不严,然后直接带入到跳转函数里去执行. 0x01 JS js方式的页面跳转1.window.location.href方式 <script language ...
- [Luogu1313][NOIP2011提高组]计算系数
题目描述 给定一个多项式 (by+ax)k(by+ax)^k(by+ax)k ,请求出多项式展开后 xn×ymx^n \times y^mxn×ym 项的系数. 输入输出格式 输入格式: 共一行,包含 ...
- [USACO14JAN]滑雪等级Ski Course Rating
题目描述 The cross-country skiing course at the winter Moolympics is described by an M x N grid of eleva ...
- HDU 6607 Time To Get Up(状态压缩+枚举)
题目网址: http://acm.hdu.edu.cn/showproblem.php?pid=6077 思路: 先预处理一下,将每个数字块的“X”看作1,“.”看作0,进行状态压缩转换成二进制数,用 ...
- pytest中unicode编码问题(如test_fix.py::Test1::test_s1[\u6d4b\u8bd5-\u6d4b\u8bd5])
现象: 采用如下方式可将其正确显示为中文 ss = r"test_fix.py::Test1::test_s1[\u6d4b\u8bd5-\u6d4b\u8bd5]" print( ...
- instruments无法连接,设备查询不到,找不到工程,查询不到对应app
这种问题真是让人捉急,一定要沐浴更衣,怀着一颗虔诚的心. 1.拔掉设备(iPhone/iPad),关掉设备.(长按电源键) 2.关闭Xcode和Instruments 3.重启设备(iPhone/iP ...
- Java 中的 final、finally、finalize 有什么不同?
Java 中 final.finally.finalize 有什么不同?这是在 Java 面试中经常问到的问题,他们究竟有什么不同呢? 这三个看起来很相似,其实他们的关系就像卡巴斯基和巴基斯坦一样有基 ...
- javascript实用代码片段
持续积累中~ 拓展原型 Function.prototype.method = function(name, extend) { if(!this.prototype[name]) { this.pr ...