CentOS 7 编译安装httpd-2.4.17
来源:互联网 发布:p2p网络借款平台 编辑:程序博客网 时间:2024/06/05 08:14
环境说明
VMware 12 中 CentOS 7 x64 4cpu 2G内存
环境中已经安装了《CentOS 7 编译安装 MySQL-5.7.9》《CentOS 7 编译安装PHP7》
配置防火墙和开放端口
参考CentOS 7 编译安装 MySQL-5.7.9》中的 “配置防火墙和开放端口”
编译安装httpd所需依赖
下载
apr-1.5.2.tar.gz
apr-util-1.5.4.tar.gz
httpd-2.4.17.tar.gz
pcre-8.38.tar.gz
上传到/root/目录
######编译安装apr-1.5.2.tar.gz[root@localhost ~]# tar zxf apr-1.5.2.tar.gz && cd apr-1.5.2[root@localhost apr-1.5.2]# yum install gcc libtools -y[root@localhost apr-1.5.2]# ./configure --prefix=/usr/local/apr[root@localhost apr-1.5.2]# make && make install[root@localhost apr-1.5.2]# cd .. && rm -rf ../apr-1.5.2*######编译安装apr-util-1.5.4.tar.gz[root@localhost ~]# tar zxf apr-util-1.5.4.tar.gz && cd apr-util-1.5.4[root@localhost apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/[root@localhost apr-util-1.5.4]# make && make install[root@localhost apr-util-1.5.4]# cd .. && rm -rf apr-util-1.5.4*######编译安装pcre-8.38.tar.gz[root@localhost ~]# tar zxf pcre-8.38.tar.gz && cd pcre-8.38[root@localhost pcre-8.38]# ./configure --prefix=/usr/local/pcre[root@localhost pcre-8.38]# make && make install[root@localhost pcre-8.38]# cd .. && rm -rf pcre-8.38*
编译安装httpd-2.4.17
[root@localhost ~]# tar zxf httpd-2.4.17.tar.gz && cd httpd-2.4.17[root@localhost httpd-2.4.17]# ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre[root@localhost httpd-2.4.17]# make && make install[root@localhost httpd-2.4.17]# cd .. && rm -rf httpd-2.4.17*
配置Apache
设置Apache开机启动,添加Apache到Linux服务
[root@localhost init.d]# vi /usr/local/apache/conf/httpd.conf1.搜索ServerName www.example.com:80 去掉前面的注释2.修改DocumentRoot到/home/htdocs,以及这一行下面的一句中的<Directory到/home/htdocs这个是www的根目录设置[root@localhost apache]# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd[root@localhost init.d]# vi httpd 在第一行下添加如下两行文字# Comments to support chkconfig on RedHat Linux# chkconfig: 2345 90 90# description:http server注册该服务 [root@localhost init.d]# chkconfig --add httpd #所有开机模式下自启动[root@localhost init.d]# chkconfig httpd on #345开机模式下自启动
运行Apache
[root@localhost init.d]# service httpd start######查看运行状态[root@localhost init.d]# ps -aux | grep httpd在主机浏览器输入linux的ip出现It works!
参考网址
http://linux.it.net.cn/CentOS/server/webserver/2015/0320/14007.html
1 0
- CentOS 7 编译安装httpd-2.4.17
- CentOS 6.5编译安装httpd-2.4.7
- CentOS 6.5编译安装httpd-2.4.7
- 第一讲:CentOS 7 编译安装httpd-2.4
- centos下httpd-2.4的编译安装
- CentOS编译安装apache【httpd】
- centos mysql+httpd+php 编译安装
- httpd系列-00-编译安装-CentOS/RedHat
- CentOS编译安装nginx、memcache、httpd、php
- httpd-2.4编译安装详解
- centos7编译安装httpd-2.4
- centos下安装httpd-2.4与php-5.6源码动态编译安装
- Centos通过源代码编译安装httpd并启动
- linux centos 安装httpd-2.4.12
- centos 7 安装卸载apache(httpd)服务
- centos下httpd安装
- CentOS 安装httpd
- Linux下编译安装Apache httpd 2.4
- CDOJ 1256 打表+数组 统计
- C#Aspose生成word
- 堆栈的生长方向
- 阿里云服务器linux安装vnc过程
- 读书笔记-Android开发艺术探索-第3章-View的事件体系
- CentOS 7 编译安装httpd-2.4.17
- winsocket笔记01
- 0004.熟悉hive创建mysql数据库中的表关系
- 博客迁移到 http://blog.ykgzs.com
- Qt 打开保存文件对话框
- Spring/Hibernate 应用性能优化的7种方法
- 第六届蓝桥杯大赛个人赛(软件类)校内选拔题目\Java大学B组\1题
- VMware创建Linux虚拟机,安装CentOS7
- pip 碰到字符集的问题解决