httpd的编译安装
1.环境介绍
系统:2.6.32-279.el6.i686
2.准备编译环境
[root@localhost ~]# yum groupinstall "Server Platform Development" "Development tools" -y
[root@localhost ~]# yum install pcre-devel -y
3.下载安装需要软件
[root@localhost ~]# cd /usr/src #切换到src目录
[root@localhost ~]# wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz #下载apr文件
[root@localhost src]# wget ftp://ftp.mirrorservice.org/sites/ftp.apache.org/apr/ apr-util-1.5.4.tar.gz #下载apr-util文件
[root@localhost src]# wget http://mirrors.cnnic.cn/apache//httpd/ httpd-2.4.25.tar.bz2 #下载httpd文件
[root@localhost src]# ls
apr-1.5..tar.gz apr-util-1.5..tar.gz debug httpd-2.4..tar.bz2 kernels
4.安装apr,apr-tuil
[root@localhost src]# tar xf apr-1.5..tar.gz #解压
[root@localhost src]# cd apr-1.5.
[root@localhost apr-1.5.]# ./configure --prefix=/usr/local/apr/ #编译
[root@localhost apr-1.5.]# make && make install #安装
[root@localhost src]# tar xf apr-util-1.5..tar.gz
[root@localhost src]# cd apr-util-1.5.
[root@localhost apr-util-1.5.]# ./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr
[root@localhost apr-1.5.]# make && make install
5.编译httpd
[root@localhost src]# tar xf httpd-2.4..tar.bz2
[root@localhost src]# cd httpd-2.4.
[root@localhost httpd-2.4.]# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=event --with-include-apr
[root@localhost httpd-2.4.] make && make install
6.其他必要的配置
[root@localhost httpd-2.4.]# ln -sv /etc/httpd24/ /etc/httpd #创建符号链接
`/etc/httpd' -> `/etc/httpd24/'
[root@localhost httpd-2.4.]# vim /etc/profile.d/httpd.sh #添加path变量
[root@localhost httpd-2.4.]# cat /etc/profile.d/httpd.sh
export PATH=/usr/local/apache/bin:$PATH
[root@localhost httpd-2.4.]# source /etc/profile.d/httpd.sh #生效httpd.sh文件
[root@localhost httpd-2.4.]# httpd -v #查看版本
Server version: Apache/2.4. (Unix)
Server built: Apr ::
[root@localhost httpd-2.4.]# vim /etc/man.config #配置man文档
#添加行
MANPATH /usr/local/apache/man
7启动httpd
[root@localhost httpd-2.4.]# apachectl start #启动
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
httpd (pid ) already running
[root@localhost httpd-2.4.]# elinks -source 192.168.168.152 #测试网页
<html><body><h1>It works!</h1></body></html>
httpd的编译安装的更多相关文章
- httpd安装与配置(编译安装)
httpd简介 httpd是Apache超文本传输协议(HTTP)服务器的主程序.被设计为一个独立运行的后台进程,它会建立一个处理请求的子进程或线程的池. 通常,httpd不应该被直接调用,而应该在类 ...
- LAMP环境之编译安装httpd服务
“Apache HTTP Server”是开源软件项目的杰出代表,它基于标准的 HTTP 网络协议提供网页浏览服务. 在配置 Apache 网站服务之前,需要正确安装好 httpd 服务器软件.htt ...
- 在centos6中编译安装httpd-2.4/搭建LAMP
首先确保centos6安装平台安装一下环境: #yum groupinstall "Development Tools" "Server Platform Develo ...
- apache2.2 +php7.3安装 编译安装
1.下载 http://archive.apache.org/dist/httpd/httpd-2.2.0.tar.gz tar -xvf httpd-2.2.0.tar.gz 2.安装 ./conf ...
- 压力测试以及编译安装httpd2.4
压力测试以及编译安装httpd2.4 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.使用 deflate_module模块压缩页面优化传输速度 我们的httpd软件自带的有一个 ...
- CentOS6.5下编译安装LAMP环境
LAMP(Linux-Apache-MySQL-PHP)网站架构是目前国际流行的Web框架.该框架能够满足大流量.大并发量的网站需求:当然.也可以直接使用高性能的服务器.高性能的负载均衡硬件以及CDN ...
- 转-httpd 2.4.4 + mysql-5.5.28 + php-5.4.13编译安装过程
一.编译安装apache 1.解决依赖关系 httpd-2.4.4需要较新版本的apr和apr-util,因此需要事先对其进行升级.升级方式有两种,一种是通过源代码编译安装,一种是直接升级rpm包.这 ...
- 编译安装HTTPD 2.4.9版本
编译安装HTTPD 2.4.9版本 服务脚本:/etc/rc.d/init.d/httpd 脚本配置文件路径:/etc/sysconfig/httpd 运行目录:/etc/httpd ...
- CentOS 6.4源码编译安装httpd并启动测试
今天来总结一下在Linux中软件安装,通常我们应该知道,安装软件有两种方法:一种是软件包的安装,也就是rpm包的安装,就是指这些软件包都是 已经编译好的二进制rpm包,我们通过rpm安装工具和yum安 ...
随机推荐
- thinkphp5随机查询数据
ThinkPHP5从V5.0.17之后,如果排序使用到SQL函数,要用orderRaw()代替order()进行排序. 例:Db::name('user')->orderRaw('rand()' ...
- Robust Influence Maximization
一. 研究背景 在社会和经济网络中,影响最大化问题在过去十年中得到广泛的研究,由于其广泛应用于病毒式营销[1,2],突破检测[3],谣言监测[4]等.例如公司可以通过向初始用户(称为种子)发送免费 ...
- iptables简单用法
iptables -t 表名 <-A/I/D/R> 规则链名 [规则号] <-i/o 网卡名> -p 协议名 <-s 源IP/源子网> --sport 源端口 &l ...
- html-有趣的标签-会移动的文字
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- 'An instance 0x155e74a0 of class UIWebView was deallocated while key value observers were still registered with it.
在iOS和html混编的时候,当用iOS原生的navigation导航pop回去的时候,出现 *** Terminating app due to uncaught exception 'NSInte ...
- 与其他相似软件对比,win10中个人助理conrtana具备哪些独特的功能
目前,Cortana 可以回答各种口头问题,直接设置提醒,或者提供位置导航,并支持语音命令处理各项事务,而且随时间的推移学习更多内容,从而变得更加个性化和实用.简单而言,集成在 Edge 浏览器中的 ...
- Xcopy命令参数使用介绍
DOS批处理命令,永远是不朽的命令,不仅功能强大,同时,速度也是最快的!但是,很多新手学习计算机,都已经遗忘了本不该忘记的批处理命令 XCOPY是COPY的扩展,可以把指定的目录连文件和目录结构一并拷 ...
- Python selenium webdriver设置js操作页面滚动条
js2 = "window.scrollTo(0,0);" #括号中为坐标 当不知道需要的滚动的坐标大小时: weizhi2 = driver.find_element_by_id ...
- Java学习笔记一:数据类型I
GitHub代码练习地址:https://github.com/Neo-ML/JavaPractice/blob/master/IntPractice1.java https://github.com ...
- 使用git clone命令克隆github项目到本地时出错,提示没有权限的解决方法
最近使用 git clone 命令在Github上克隆自己项目到本地时出错:提示没有权限,确认仓库是否存在,如下图红色框所示 问题:用过 git 的小伙伴都知道克隆项目的命令是—— git clone ...