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.虽然网上教程很多但因具体环境可能有差异导致一路遇坑,摸爬滚打了两天终于弄好了.遂记下一 ...
随机推荐
- 使用Windows 8 Pro密钥光盘安装Windows 8.1 Pro
在Windows 8.1发布接近半年的时候,自己终于腾出来了时间,准备升级一下自己的系统.作为一名极度强迫症患者,加上校园网的悲剧网速,最后决定使用光盘镜像全新安装而不是通过应用商店的升级. Figu ...
- codeforces877c
C. Slava and tanks time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- bootstrap2.2登录验证
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>& ...
- cxgrid动态生成footersummary 并获得值
cxgrid动态生成footersummary 并获得值 var f: TcxGridDBTableSummaryItem; cx_for_mctv.OptionsView.Footer := t ...
- Android-Java-类与对象的关系
类class 例如:class Student {},很多人把class Student {}称为对象或实体,其实这样并不合理,应该称为描述实体/描述对象: 因为被称为对象或实体的是,new Stud ...
- Win7下无法启动sql server fulltext search (mssqlserver)的问题
在Win7下安装了SQL Server 2005, 但启动“SQL Server FullText Search (MSSQLSERVER)”服务时启动不成功,系统日志显示“SQL Server Fu ...
- 源自KPI交谈的思考
说明白一件事情不容易 前言 跟领导谈及下半年KPI的时候,问我什么打算/计划,在交谈过程中,有几个有意思的点 问题 Q: 目标是hold住服务端,那么怎么样才算hold住服务端? Q: 如何推动别人去 ...
- 关于Winform下DataGridView中实现checkbox全选反选、同步列表项的处理
近期接手一个winform 项目,虽然之前有.net 的经验,但是对一些控件的用法还不是很熟悉. 这段时间将会记录一些在工作中遇到的坎坷以及对应的解决办法,写出来与大家分享并希望大神提出更好解决方法来 ...
- 添加vscode自定义代码块
以vue为例 一.打开vscode>文件>首选项>用户代码片段>vue.json二.编写代码块 其中一行一句:$1是占位符,就是你可以输入的地方."http get& ...
- AEAI DP开发统计分析
1 背景概述 平时做统计分析都是调rest服务,给前台提供数据,然后在管理控制台里配置portlet.但并不是所有的项目都会用到portal,这时就需要在AEAI DP应用开发平台里开发统计分析了,下 ...