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.三台主机安装完之 ...
随机推荐
- Leaflet入门:添加点线面并导入GeoJSON数据|Tutorial of Leaflet: Adding Points, Lines, Polygons and Import GeoJSON File
Web GIS系列: 1.搭建简易Web GIS网站:使用GeoServer+PostgreSQL+PostGIS+OpenLayers3 2.使用GeoServer+QGIS发布WMTS服务 3.使 ...
- 我的CSS3学习笔记
1.元字符使用: []: 全部可选项 ||:并列 |:多选一 ?: 0个或者一个 *:0个或者多个 {}: 范围 2.CSS3属性选择器: E[attr]:存在attr属性即可: E[attr=val ...
- mybatis和spring mvc整合
1.环境 a. jar包 (mybatis+spring mvc运行包+两者整合包mybatis-spring.jar) b.工程目录 c. 配置文件 mybatis:SqlMapConfig.xm ...
- Redis缓存相关
Redis缓存服务搭建及实现数据读写 RedisHelper帮助类 /// <summary> /// Redis 帮助类文件 /// </summary> public cl ...
- <a>标签的用法以及[@text_cut]
<a href="${a.url}" target="_blank">[@text_cut s=a.title len=titLen append= ...
- Tomcat配置文件与启动顺序
三个配置应用的位置: 1.conf目录下的server.xml文件:此方式为Eclipse默认配置方法,同时也是三种方式中优先级最高的. <?xml version="1.0" ...
- java学习(二)运算符
一.运算符 赋值运算符:= += -= *= /= %= 算术运算符:+ - * / % ++ -- int x = 3; int y = 4 int c = x*1.0 ...
- maven-plugins说明
maven提供了丰富的plugins. maven是一个插件执行的框架. 核心部分的描述: clean. clean插件. goal:clean 清除构建时生成的文件,文件目录 project.bui ...
- 启动类加注解@MapperScan spring boot mybatis 启动错误
Description: Field userDao in com.gcy.springsecuritydemo.service.user.UserService required a bean of ...
- asp.net core 2.0类库项目读取配置文件
1.首先在类库项目中添加 这3个库. 2.在类库项目中添加AppSetting.cs.代码如下: using Microsoft.Extensions.Configuration;using Syst ...