编译安装httpd 2.4
2018-01-24 16:18
399 查看
CentOS 6.9
(1)关闭SELINUX
Note:如果不关闭SELINUX,在设置DocumentRoot的时候可能会出现Forbidden等各种不可预知的问题
(2)关闭IPTABLES和添加系统用户
也可以打开80端口,这里为了测试方便就直接关闭
(3)需要的依赖包
(4)下载安装包
(1)关闭SELINUX
Note:如果不关闭SELINUX,在设置DocumentRoot的时候可能会出现Forbidden等各种不可预知的问题
#sed -i 's/^SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
(2)关闭IPTABLES和添加系统用户
也可以打开80端口,这里为了测试方便就直接关闭
# /etc/init.d/iptables stop # groupadd -r apache # useradd -r -g apache apache
(3)需要的依赖包
# yum -y groupinstall "Development tools" "Server Platform Development" # yum -y install pcre-devel # yum -y install expat-devel
(4)下载安装包
wget https://mirrors.aliyun.com/apache/httpd/httpd-2.4.29.tar.gz https://mirrors.aliyun.com/apache/apr/apr-1.6.3.tar.gz https://mirrors.aliyun.com/apache/apr/apr-util-1.6.1.tar.gz[/code] (5)安装apr# tar xf apr-1.6.3.tar.gz # apr-1.6.3 # ./configure --prefix=/usr/local/apr # make && make install
(6)安装apr-util# tar xf apr-util-1.6.1.tar.gz # cd apr-util-1.6.1 # ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ # make && make install
(7)安装httpd# tar xf httpd-2.4.29.tar.gz # cd httpd-2.4.29 # ./configure --prefix=/usr/local/apache --sysconf=/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-mem=event --libdir=/usr/lib64
(8)添加环境变量# echo 'export PATH=/usr/local/apache/bin/apachectl:$PATH' > /etc/profile.d/httpd.sh
(9)启动http服务# apachectl -k start
(10)查看监听端口ss -tnl
相关文章推荐
- 源码编译安装 httpd2.4+MariaDB5.5+php5.4 全新的LAMP 推荐
- Linux下httpd 2.4 的编译安装
- 编译安装httpd-2.4
- CentOS6编译安装LAMP(CentOS6、httpd-2.4、php-7.1、mariadb-10.2、memcached-3.0.4)
- CentOS6.6上编译安装httpd2.4
- httpd-2.4编译安装基本步骤
- 编译安装httpd-2.4
- 下载编译安装httpd 2.4的最新版本
- CentOS6 编译安装LAMP(Apache-httpd2.4,Mariadb,php)_2015092001
- CentOS 6.5 编译安装httpd2.4安装
- centos6 编译安装httpd-2.4方法二
- web:4、编译安装httpd-2.4及其新特性
- HTTP 之 编译安装HTTPD2.4
- centos下httpd-2.4的编译安装
- centos7编译安装httpd-2.4
- (五)httpd-2.4的编译安装(编译安装amp并且给php配置xcache机制)
- httpd-2.4编译安装详解
- 源码编译安装httpd2.4及虚拟主机
- 编译安装httpd-2.4
- 【Apache学习】编译安装httpd2.4 含傻瓜版自动安装脚本