centos 7编译安装apache
1.安装工具和依赖包
yum install unzip
yum -y install gcc gcc-c++
2.创建软件安装目录
mkdir /usr/local/{apr,apr-util,apr-iconv,httpd}
3.解压软件文件
tar -zxvf httpd.tar.gz
tar -zxvf apr.tar.gz
tar -zxvf apr-iconv.tar.gz
tar -zxvf apr-util.tar.gz
tar -zxvf pcre.tar.gz
4.编译安装
./configure --prefix=/usr/local/apr
make
make install
在执行configure可能会出现
rm: cannot remove `libtoolT': No such file or directory错误信息。
网上查阅了一下资料,提示编辑configure这个文件,将 $RM “$cfgfile” 那行注释掉 ,然后重新编译即可。
./configure --prefix=/usr/local/pcre
make
make install
简洁安装
将apr-1.5.2与apr-util-1.5.4重命名为apr和apr-util复制到apache源代码srclib目录下
mv apr apr-util httpd/srclib
./configure prefix=/usr/local/httpd --with-pcre=/usr/local/pcre/bin/pcre-config --with-included-apr --enable-so
make
make install
5.验证安装是否成功
cd /usr/local/httpd
./apachectl -k start
6.添加开机启动
cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
打开 vi /etc/rc.d/init.d/httpd
在#!/bin/sh 下面加上
#chkconfig: 2345 10 90
#description: Activates/Deactivates Apache Web Server
chkconfig --add httpd
chkconfig httpd on
7.apache编译选项
--enable-socache-memcache memcache small object cache provider
--enable-socache-dc distcache small object cache provider
--enable-so DSO capability. This module will be automatically
enabled unless you build all modules statically.
--enable-watchdog Watchdog module
--enable-macro Define and use macros in configuration files
--enable-dbd Apache DBD Framework
--enable-bucketeer buckets manipulation filter. Useful only for
developers and testing purposes.
--enable-dumpio I/O dump filter
--enable-echo ECHO server
--enable-example-hooks Example hook callback handler module
--enable-case-filter Example uppercase conversion filter
--enable-case-filter-in Example uppercase conversion input filter
--enable-example-ipc Example of shared memory and mutex usage
--enable-buffer Filter Buffering
--enable-data RFC2397 data encoder
centos 7编译安装apache的更多相关文章
- CentOS 下编译安装Apache
CentOS 下编译安装Apache 卸载原有的apache 首先从 http://httpd.apache.or 下载apache源码包httpd-2.4.4.tar.gz然后从 http://ap ...
- centos手动编译安装apache、php、mysql
64位centos 5.5手动安装lamp,要求curl.json.pdo_mysql.gd,记录如下. centos 5.4.5.5.5.6的内核都是2.6.18,都可以安装php 5.3. 卸载旧 ...
- CentOS下编译安装Apache(httpd)
官网下载最新版本的apache, apr, apr-util http://httpd.apache.org/download.cgi#apache24 http://apr.apache.org/d ...
- CentOS下编译安装Apache
与Apache 2.2.x相比,Apache 2.4.x提供了很多性能方面的提升,包括支持更大流量.更好地支持云计算.利用更少的内存处理更多的并发等.除此之外,还包括性能提升.内存利用.异步 I/O的 ...
- centos 服务器编译安装apache+php
1.检查服务器中是否自带httpd,如果/etc/httpd/httpd.conf,说明系统自带httpd服务,需要卸载或关闭服务,不要让他影响到本次安装的服务启动 可以用 service httpd ...
- Linux(CentOS)下编译安装apache
Centos7.6系统 已经安装lnmp一键环境 想装个apache跑php7 (php7的安装以及与apache的交互在这里: https://www.cnblogs.com/lz0925/p/11 ...
- linux中编译安装Apache、PHP、MySQL(上)
1.简介 在阿里云买了个云服务器,一直没时间折腾.过了近十天了吧,才有时间好好玩玩这个云服务器.自己是做Web开发的,所以我需要的开发环境是LAMP.之前打算是采用yum安装,不过yum安装apach ...
- 编译安装Apache httpd和php搭建KodExplorer网盘
编译安装Apache httpd和php搭建KodExplorer网盘 环境说明: 系统版本 CentOS 6.9 x86_64 软件版本 httpd-2.2.31 php- ...
- CentOS 6, 编译安装lamp (php-fpm)
1 整体要求 php-fpm.httpd.mysql三者分别安装在三台虚拟机上: 第一台虚拟主机用于安装Mariadb,第二台虚拟主机安装php-fpm:第三台虚拟主机安装httpd.三台主机安装完之 ...
随机推荐
- php中this、self、parent解析
概述: this:指向类当前对象的指针:self:指向类本身,一般指向类中的静态变量:parent:指向父类的指针,一般使用parent来调用父类的构造函数. 下面通过程序详细介绍: 1.this & ...
- cenos7切换阿里源
备份并安装base reop源 cd /etc/yum.repos.d sudo mv CentOS-Base.repo CentOS-Base.repo.bak 下载阿里源并配置 sudo wget ...
- 18、Semantic-UI之进度条
在使用进度条的时候也是必须要结合项目中ajax和后台数据结合使用的. 示例:定义基础进度条 <div class="ui progress"> <div cl ...
- Arcgis Android 常见问题
关于arcgis android 安装包较大的问题 如果想缩小大小,可以只保留armeabi,只是这样就不支持x86类型cpu的手机了. 可以考虑做成单独的版本,供用户下载. 即打2个包,一个供普通a ...
- Java Input Stream Diagram
JAVA IO Diagram |-- ByteArrayInputStream |-- BufferedInputStream |-- FileInputStream |-- DataInputSt ...
- android hook getdeceiveid
很多手机软件使用了手机绑定.QQ,微信等.如果使用了不同的设备,则需要验证码. 要用一台手机来模拟与另一台手机一样环境,估计hook 系统的相关函数可以实现. 想着应该有现成的软件的,例如 smart ...
- $().click()和$().on('click',function(){})的区别
1. $(选择器).click(fn) 当选中的选择器被点击时触发回调函数fn.只针对与页面已存在的选择器. HTML代码: <!DOCTYPE html> <html lang=& ...
- shell+crontab 实时服务进程监控重启
#!/bin/sh #filename: checkProcess.sh #示例:每分钟检测httpd是否在运行,不在运行则重启 #crontab -e # 加入:*/ * * * * checkPr ...
- C# Winform下一个热插拔的MIS/MRP/ERP框架14(自动更新)
对于软件来说,启用自动更新是非常必要的. 根据软件的应用场景,我们可以设计不同的更新模型. 目前,IMES框架运行在.Net framework 4.0下面,使用的Win系统版本在Win7,域内管控, ...
- redis 3.0 集群__监控警报工具(sentinel)
参考文档 http://redis.readthedocs.org/en/latest/topic/sentinel.html 因为目前还处于开发阶段,就先不研究了,待续