“Apache配置HTTPS”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
(建立内容为“#安装openssl <syntaxhighlight lang="shell-session"> root@aade5ae73079:/var/www/html# yum install openssl </syntaxhighlight> #生成私钥 <syntaxhighlight lang…”的新页面)
 
第1行: 第1行:
#安装openssl
+
=== 安装openssl ===
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 
root@aade5ae73079:/var/www/html# yum install openssl
 
root@aade5ae73079:/var/www/html# yum install openssl
 
</syntaxhighlight>
 
</syntaxhighlight>
  
#生成私钥
+
=== 生成私钥 ===
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 
root@aade5ae73079:/var/www/html# openssl genrsa -out jihongchang.key 2048
 
root@aade5ae73079:/var/www/html# openssl genrsa -out jihongchang.key 2048
第16行: 第16行:
  
  
生成证书申请<syntaxhighlight lang="shell-session">
+
=== 生成证书申请 ===
 +
<syntaxhighlight lang="shell-session">
 
root@aade5ae73079:/var/www/html# openssl req -new -key jihongchang.key -out jihongchang.csr
 
root@aade5ae73079:/var/www/html# openssl req -new -key jihongchang.key -out jihongchang.csr
 
You are about to be asked to enter information that will be incorporated
 
You are about to be asked to enter information that will be incorporated

2022年8月11日 (四) 10:03的版本

安装openssl

root@aade5ae73079:/var/www/html# yum install openssl

生成私钥

root@aade5ae73079:/var/www/html# openssl genrsa -out jihongchang.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
................................+++++
.........+++++
e is 65537 (0x010001)
root@aade5ae73079:/var/www/html#

-out说明其为输出文件,2048是其密钥位数。


生成证书申请

root@aade5ae73079:/var/www/html# openssl req -new -key jihongchang.key -out jihongchang.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:Beijing
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
root@aade5ae73079:/var/www/html#