[root@localhost ~]#systemctl stop firewalld
[root@localhost ~]#setenforce 0
[root@localhost ~]#iptables -F
[root@localhost ~]#yum -y install pcre zlib openssl openssl-devel pcre-devel zlib-devel
[root@localhost ~]#cd /usr/local/nginx-1.16.0
[root@localhost nginx-1.16.0]#./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module
[root@localhost ~]#make && make install
[root@localhost ~]#useradd -M -s /sbin/nologin nginx
[root@localhost ~]#ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin
[root@localhost ~]#nginx
[root@localhost ~]# touch /etc/pki/CA/index.txt
[root@localhost ~]# echo 01 > /etc/pki/CA/serial
[root@localhost ~]# cd /etc/pki/CA/
[root@localhost CA]# umask 066
[root@localhost CA]# openssl genrsa -out /etc/pki/CA/private/cakey.pem 2048
[root@localhost ~]# openssl req -x509 -key /etc/pki/CA/private/cakey.pem -days 7300 -out /etc/pki/CA/cacert.pem
Country Name (2 letter code) [XX]:CN
State or Province Name (full name) []:BJ
Locality Name (eg, city) [Default City]:BJ
Organization Name (eg, company) [Default Company Ltd]:WXYC
Organizational Unit Name (eg, section) []:JSB
Common Name (eg, your name or your server's hostname) []:a.com
Email Address []:111111@sina.com

[root@localhost ~]# mkdir key
[root@localhost ~]# cd key/
[root@localhost key]# umask 066
[root@localhost key]# openssl genrsa -out service.key 2048
[root@localhost key]# openssl req -new -key service.key -out service.csr
Country Name (2 letter code) [XX]:CN
State or Province Name (full name) []:BJ
Locality Name (eg, city) [Default City]:BJ
Organization Name (eg, company) [Default Company Ltd]:WXYC
Organizational Unit Name (eg, section) []:JSB
Common Name (eg, your name or your server's hostname) []:a.com
Email Address []:111111@sina.com

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

[root@localhost key]# mkdir /etc/pki/CA/csr
[root@localhost key]# mv service.csr /etc/pki/CA/csr
[root@localhost key]# openssl ca -in /etc/pki/CA/csr/service.csr -out /etc/pki/CA/certs/service.crt -days 365
Sign the certificate? [y/n]:y

1 out of 1 certificate requests certified, commit? [y/n]y

最新文章

  1. gruntJs篇之connect+watch自动刷新
  2. gitbook使用
  3. 换SSD硬盘,重装系统,一阵子忙乱
  4. SendKeys回车操作类
  5. mstsc命令详解
  6. iOS开发——设备篇Swift篇&判断设备类型
  7. 04、生成 HTMLTestRunner 测试报告
  8. phpcms v9文章页调用点击量方法
  9. Android开发模板代码(二)——为ImageView设置图片,退出后能保存ImageView的状态
  10. apply函数用法
  11. DSAPI WIN7风格
  12. <jsp:useBean>、<jsp:setProperty>与<jsp:getProperty>
  13. Spring Security Session并发控制原理解析
  14. ActiveMQ在C#中的应用
  15. Cartographer源码阅读(3):程序逻辑结构
  16. (4)Python3笔记 之 流程控制
  17. USB速率识别
  18. spring boot的拦截器简单使用
  19. nginx 错误日志分析
  20. 打开mvc项目无法运行,报"Unable to launch the IIS Express Web server"

热门文章

  1. [轉]Exploit The Linux Kernel NULL Pointer Dereference
  2. __attribute__((regparm(3))) from GNU C
  3. java.sql.BatchUpdateException: ORA-01861: 文字与格式字符串不匹配
  4. KiCAD差分布线
  5. secureCRT 如何上传下载文件
  6. Codeforces 251C Number Transformation DP, 记忆化搜索,LCM,广搜
  7. QMap的key也可以是一个结构体类吗?
  8. linux netstat 统计连接数查看外部(转)
  9. python输入问题
  10. spark代码写入hdfs错误