httpd系列-00-编译安装-CentOS/RedHat
来源:互联网 发布:软件开发模型优缺点 编辑:程序博客网 时间:2024/05/16 01:14
- 说明
- rpm软件包安装
- 默认配置
- 源码编译安装
- 编译环境准备
- 编译安装
- 配置
- 安装中遇到的问题
- 缺少apr
说明
- 这里使用的是CentOS/RedHat
- 关闭SELinux
使用命令 getenforce
查看,如果不是Permissive
则使用 setenforce 0
禁用该功能
rpm软件包安装
yum install httpd
默认配置
以这种方式(软件包)安装后,常用的默认配置如下,如果要定制各种选项,请移步源码编译安装
:
- 工作目录:/etc/httpd/
- 主配置文件目录:/etc/httpd/conf.d/
- 模块目录:/etc/httpd/modules/(链接)
- ../../usr/lib64/httpd/modules
- 日志目录:/etc/httpd/logs/(链接)
- ../../var/log/httpd
- access_log
- error_log
- ../../var/log/httpd
源码编译安装
编译环境准备
# 下载wget http://archive.apache.org/dist/httpd/httpd-2.4.4.tar.gz# 解压tar -zxvf httpd-2.4.4.tar.gzcd httpd-2.4.4
编译安装
./configure --prefix=/usr/local/apache244 \--sysconfdir=/etc/httpd \--enable-so \--enable-ssl \--enable-cgi \--enable-rewrite \--with-zlib \--with-pcre \--enable-mpms-shared=all \--with-mpm=event \--enable-proxy \--enable-proxy-http \--enable-proxy-ajp \--enable-proxy-balancer \--enable-lbmethod-heartbeat \--enable-heartbeat \--enable-slotmem-shm \--enable-slotmem-plain \--enable-watchdog \--with-apr=/usr/local/apr \--with-apr-util=/usr/local/apr-utilmake && make install
配置
为apache提供init脚本,实现服务的控制。
建立/etc/rc.d/init.d/httpd文件,并添加如下内容:
cp support/apachectl /etc/rc.d/init.d/httpdchmod +x /etc/rc.d/init.d/httpdvim /etc/rc.d/init.d/httpd# 添加如下两行内容:#chkconfig: 2345 10 90#description: Activates/Deactivates Apache Web Serverchkconfig --add httpdservice httpd start
安装中遇到的问题
缺少apr
# 下载wget http://mirrors.cnnic.cn/apache//apr/apr-1.5.2.tar.gzwget http://mirrors.cnnic.cn/apache//apr/apr-util-1.5.4.tar.gz# 解压tar -zxvf apr-1.5.2.tar.gztar -zxvf apr-util-1.5.4.tar.gz# 去掉版本号mv apr-1.5.2 aprmv apr-util-1.5.4 apr-util# 安装apr./configure --prefix=/usr/local/aprmake && make install# 安装apr-util./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/aprmake && make install
0 0
- httpd系列-00-编译安装-CentOS/RedHat
- nginx系列-00-编译安装-CentOS/RedHat
- CentOS编译安装apache【httpd】
- CentOS 6.5编译安装httpd-2.4.7
- CentOS 6.5编译安装httpd-2.4.7
- centos下httpd-2.4的编译安装
- CentOS 7 编译安装httpd-2.4.17
- centos mysql+httpd+php 编译安装
- CentOS编译安装nginx、memcache、httpd、php
- RedHat/CentOS源码编译安装MySQL5.6.12
- Redhat安装httpd(apache)
- redhat下httpd的安装
- Centos通过源代码编译安装httpd并启动
- 第一讲:CentOS 7 编译安装httpd-2.4
- centos下httpd安装
- CentOS 安装httpd
- httpd编译安装
- httpd编译安装
- shell 脚本第二发 基础
- 基于JAX-WS的WebService在Spring框架中的实现与调用
- Day11:FUN
- 正向代理,反向代理和透明代理的原理和区别!
- Day12:MEETING AND HANGING
- httpd系列-00-编译安装-CentOS/RedHat
- Linux下安装vsftpd
- Day12:CTF FAILURE
- 约瑟夫环数学递推公式及其证明
- CentOS下搭建nginx+php环境
- HttpUrlConnection两种请求数据的方式get和post提交数据
- 配置JDK环境变量
- Day13:What did I do today?
- Day14:Interview