博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
openssl
阅读量:6867 次
发布时间:2019-06-26

本文共 1185 字,大约阅读时间需要 3 分钟。

 

安装

wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz    #下载lstar -zxf openssl-1.0.2n.tar.gz cd openssl-1.0.2n/./config   #编译安装makemake install

查看openssl 目录文件

[root@s7zbx01 ssl]# ls

bin certs include lib man misc openssl.cnf private

 

 

生成秘钥:

openssl genrsa -out server.key 2048

 创建 证书签名申请(CSR:certificate signing request):

openssl req -new -key server.key -out certreq.csr

验证CRS正确性

openssl req -text -in certreq.csr -noout

自签名证书:

openssl x509 -req -days 365 -in certreq.csr -signkey server.key -out server.crt

 

 

 

添加mod_ssl模块,httpd-ssl.conf配置

vim /usr/local/apache2/conf/httpd.conf

LoadModule ssl_module modules/mod_ssl.soInclude conf/extra/httpd-ssl.conf       LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
# 取消掉注释

 

vim  /usr/local/apache2/conf/extra/httpd-ssl.conf

SSLSessionCache        "shmcb:/usr/local/apache2/logs/ssl_scache(512000)"   #这里使用的是 shmcb,确保该模块                                                                              在httpd.conf中加载了 SSLCertificateFile "/usr/local/apache2/conf/server.crt" SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"     #将私钥和证书放到指定位置

 

重启httpd服务

systemctl restart httpd

 

转载于:https://www.cnblogs.com/blogscc/p/7943342.html

你可能感兴趣的文章
spark能传递外部命名参数给main函数吗?
查看>>
[LeetCode] Convex Polygon 凸多边形
查看>>
递归神经网络
查看>>
iframe父页面和子页面相互调用的方法
查看>>
【批处理学习笔记】第十七课:截取字符串
查看>>
[Erlang 0066] Erlang orddict
查看>>
Hadoop HDFS 用户指南
查看>>
体验mssql-cli
查看>>
ASP.NET MVC之国际化(十一)
查看>>
Swift析构器
查看>>
★路由递归查询方法及相关图…
查看>>
SpringMvc入门
查看>>
scrapy 登录
查看>>
上海往事之看房子
查看>>
SQL Server使用规范
查看>>
高性能mysql主存架构
查看>>
《Programming WPF》翻译 第7章 3.笔刷和钢笔
查看>>
[20160906]修改口令在内存中.txt
查看>>
解剖SQLSERVER 第九篇 OrcaMDF现在能通过系统DMVs显示元数据(译)
查看>>
基于.net开发chrome核心浏览器【六】
查看>>