当前位置:首页 > Nginx
在 Linux 系统下安装和配置 Nginx·上篇
来源:靑龍一笑的博客  作者:靑龍一笑  发布时间:2017-01-06 12:49:57  点击量:1510  评论:0

一、使用 OpenSSL 建立自己的证书

[root@RicenOS ~]# mkdir -pv /opt/webca
[root@RicenOS ~]# cd /opt/webca/

    1、生成 RSA 密钥

[root@RicenOS webca]# openssl genrsa -des3 -out ca.key 2048

    以下输入并确认密码:P@ssw0rd

Enter pass phrase for ca.key:
Verifying - Enter pass phrase for ca.key:

    2、生成一个不需要输入密码的密钥文件

[root@RicenOS webca]# openssl rsa -in ca.key -out ca_nopass.key

    以下输入刚才设置的密码:P@ssw0rd

Enter pass phrase for ca.key:

    3、生成一个证书请求:

[root@RicenOS webca]# openssl req -new -key ca.key -out ca.csr

    以下输入刚才设置的密码:P@ssw0rd

Enter pass phrase for ca.key:

    以下输入国家:CN

Country Name (2 letter code) [XX]:CN

    以下输入省份:FuJian

State or Province Name (full name) []:FuJian

    以下输入城市:XiaMen

Locality Name (eg, city) [Default City]:XiaMen

    以下输入公司:RicenSoftwares

Organization Name (eg, company) [Default Company Ltd]:RicenSoftwares

    以下输入部门(可以不填):Technology Department

Organizational Unit Name (eg, section) []:Technology Department

    以下输入姓名(可以不填):Ricen

Common Name (eg, your name or your server's hostname) []:Ricen

    以下输入邮箱:C.S.Ricen@ricensoftwares.com.cn

Email Address []:C.S.Ricen@ricensoftwares.com.cn

    以下两项可以不填:

A challenge password []:
An optional company name []:

    4、签发证书

[root@RicenOS webca]# openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

    以下输入前面设置的密码:P@ssw0rd

Enter pass phrase for ca.key:

    未完,请继续浏览《在 Linux 系统下安装和配置 Nginx·中篇

版权所有 © 2005-2023 靑龍一笑的博客  Powered by C.S.Ricen
Copyright © 2005-2023 by www.ricensoftwares.com.cn  All Rights Reserved.

欢迎光临本站,这里是靑龍一笑的博客。

因资金匮乏,本站已迁到国外的免费空间,可能导致本站的访问速度较慢,由此给您带来的不便,敬请谅解。

您可以通过下方的“支持本站建设”链接,给本站提供资金支持。

Free Web Hosting