CentOS7 apache
1.准备环境 centos7最小化安装 yum安装wget、vim、gcc、gcc-c++、cmake 2.安装apache2.4.10 官网:http://httpd.apache.org/ 下载源码包: cd /usr/loca/src wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.10.tar.gz 下载apache组件apr、apr-util: wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.10-deps.tar.gz 安装apr和apr-util: tar zxvf httpd-2.4.10-deps.tar.gz cd httpd-2.4.10/srclib/apr ./configure --prefix=/usr/local/apr make && make install cd ../apr-util ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr 下载安装zlib1.2.8 wget http://zlib.net/zlib-1.2.8.tar.gz tar zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure --prefix=/usr/local/zlib make && make install 下载安装pcre8.35 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz tar zxvf pcre-8.35.tar.gz cd pcre-8.35 ./configure --prefix=/usr/local/pcre make && make install 下载openssl,安装apache2.4.9时提示openssl版本过低,centos7自带版本openssl1.0.1e: wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz 不卸载系统自带openssl,直接源码编译openssl1.0.1h tar zxvf openssl-1.0.1h.tar.gz cd openssl-1.0.1h ./configure --prefix=/usr/local/openssl make && make install mv /usr/bin/openssl /usr/bin/openssl.1.0.1e ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl 安装httpd2.4.9: cd /usr/local/src tar zxvf httpd-2.4.9.tar.gz cd httpd-2.4.9 ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-cgi --enable-ssl --enable-rewrite --with-ssl=/usr/local/openssl --with-pcre=/usr/local/pcre --with-z=/usr/local/zlib --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl=/usr/local/openssl --enable-modules=most --enable-mpms-shared=all --with-mpm=event
make && make install
centos7使用systemctl代替chkconfig管理服务,防火墙也由iptables更换成了firewalld 首先用systemctl关闭防火墙: systemctl stop firewalld.service systemctl disable firewalld.service 开启apache服务器: cd /usr/local/apache/bin ./apachectl start 客户端浏览器上输入地址: http://192.168.47.130/ 看到页面显示It works!证明服务器已成功启动 另外因为安装Apache服务器是选择安装了支持openssl,顺便研究了一下如何在apache中配置openssl 首先在/etc/httpd/http.conf文件中修改: ServerName为www.example.com:80 去掉LoadModule ssl_module modules/mod_ssl.so前的#号 去掉LoadModule socache_shmcb_module modules/mod_socache_shmcb.so前的#号 去掉Include /etc/httpd/extra/httpd-ssl.conf前的#号 生成服务器证书: 1.生成服务器用的私钥文件server.key openssl genrsa -out server.key 1024 2.生成未签署的server.csr openssl req -new -key server.key -out server.csr 程序提示输入一系列参数,包括国别、省名、市名。。。,按照提示输入即可 3.签署服务器证书文件server.crt openssl req -x509 -days 365 -key server.key -in server.csr -out server.crt 然后将生成的server.key、server.csr、server.crt拷贝到/etc/httpd目录下 /usr/local/apache/bin/apachectl restart 浏览器访问:https://192.168.47.130,此时浏览器会提示安装证书,安装后显示页面It works!,证明ssl模块已正常工作。
---------------------------------------------------------------------------------------------------------------
http://www.centoscn.com/apache/2014/0727/3364.html
CentOS7 apache的更多相关文章
- centos7 apache httpd安装和配置django项目
一.安装httpd服务 apache在centos7中是Apache HTTP server.如下对httpd的解释就是Apache HTTP Server.所以想安装apache其实是要安装http ...
- 如何搭建lamp(CentOS7+Apache+MySQL+PHP)环境 [转]
在网上搜资料,自己在本地虚拟机上尝试搭建,弄了整整一天一夜,终于弄好了.网上的资料,虽然很多,但大多都是重复的,拿去试了之后,又很多都不能得到正确的结果.最终找到了适合我的linux环境的搭建方式;在 ...
- 如何搭建lamp(CentOS7+Apache+MySQL+PHP)环境
我的环境:虚拟机是:VMware-workstation-full-8.0.0-471780.exe:Linux系统用的是:CentOS-7-x86_64-Minimal-1503-01.ios;(阿 ...
- CentOS7+Apache+MySQL+PHP环境
Apache 1.安装Apache:yum -y install httpd 2.开启apache服务:systemctl start httpd.service 3.设置apache服务开机启动:s ...
- centos7+apache+svn配置 踩坑,注意权限问题。apache应用目录checkout应用 必须用这个命令:svn co file:///home/svn/test/ test ,通过svn add * &&commit 及任意修改都是不行的
阅读帮助 命令提示符 [root@server-002 ~]# 表示当前服务root用户执行的命令 [svn@server-002 ~]$ 表示普通用户svn执行的命令 [root@localhost ...
- centOS7 apache ssl证书安装配置
背景说明:服务器是centOS7.4 七牛申请的免费ssl证书 默认apache是没有安装SSL模块的,所以需要安装,接着使用命令: yum install -y mod_ssl apache目录 / ...
- CentOS7 Apache的安装配置
前些天安装了Nginx,为了好玩我就又安装Apache,Apache的安装还算顺利.在此做一下学习记录和经验分享. 一.安装httpd 1.先查看一下系统有没有已经安装了httpd的,如果啥都没查到, ...
- Linux Centos7 Apache 訪问 You don't have permission to access / on this server.
折腾了非常久,今天才找到了最正确的答案.感言真不easy. 百度出来的99%都是採集的内容.全都是错误的. You don't have permission to access / on this ...
- centos7 apache 配置ssl
因为小程序后台服务器需要是https的,所以这两天赶紧百度了一波什么是https以及怎么将服务器升级为https.虽然网上教程很多但因具体环境可能有差异导致一路遇坑,摸爬滚打了两天终于弄好了.遂记下一 ...
随机推荐
- Codeforces Round #264 (Div. 2) D. Gargari and Permutations 多序列LIS+dp好题
http://codeforces.com/contest/463/problem/D 求k个序列的最长公共子序列. k<=5 肯定 不能直接LCS 网上题解全是图论解法...我就来个dp的解法 ...
- javascript 编码规范
前端编码风格规范(3)-- JavaScript 规范 其他三个写的也挺好的,不过html和css我已经参照了其他的. 防污染与IIFE (function($, w, d){ 'use strict ...
- Redis集群错误
部署Redis集群时出现如下错误: >>> Creating cluster>>> Performing hash slots allocation on 9 no ...
- Swift简单实现一个常规条款、免责声明文字+带有链接的展示形式
效果: IMG_F08DABE063A6-1.jpeg class DisclamerView: UIView { //@objc weak var vc:UIViewController? // ...
- 团队项目第6周 - Alpha阶段项目复审 - 天冷记得穿秋裤队
团队项目第六周 - Alpha阶段项目复审 - 天冷记得穿秋裤队 经小组讨论得出以下排名 小组 优点 缺点,bug报告 最终名次 冲鸭队 一款融合了2048和俄罗斯方块的小游戏,题材十分新颖,游戏充满 ...
- Dnsmasq安装与配置-搭建本地DNS服务器
默认的情况下,我们平时上网用的本地DNS服务器都是使用电信或者联通的,但是这样也导致了不少的问题,首当其冲的就是上网时经常莫名地弹出广告,或者莫名的流量被消耗掉导致网速变慢.其次是部分网站域名不能正常 ...
- 可编辑树Ztree的使用(包括对后台数据库的增删改查)
找了很多网上关于Ztree的例子和代码才搞定. 首先,关于Ztree的代码不介绍了,网上下载之后,引用下列四个文件就能使用了. 1.关于配置选项.主要通过回调函数来实现向后台发送数据,实现增删改查. ...
- 【转】Windows Server 2016 安装 IIS 服务时提示指定备用源路径
原文地址:http://www.codingwhy.com/view/973.html 在Windows Serever 2016中安装IIS的时候,遇到以下提示 是否需要指定备用源路径?一个或多个安 ...
- [翻译]Bitmap的异步加载和缓存
内容概述 [翻译]开发文档:android Bitmap的高效使用 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently", ...
- 全球第一开源ERP Odoo操作手册 数据库简介
1.3 数据库简介 每一个独立核算的企业都有一套相互关联的账簿体系, 把这一套完整的账簿体系建立在计算机系统中就称为一个数据库. 一般一个企业只用一个数据库. 如果企业有几个下属的独立核算的实体,也可 ...