#使用openssl生成基于rsa数学算法长度为1024bit的密钥,文件必须以key为结尾
localhost[qq]:~ # openssl genrsa 1024 > /opt/ssl/server.key
Generating RSA private key, 1024 bit long modulus
...........++++++
.++++++
e is 65537 (0x10001)
localhost[qq]:~ # openssl req -new -key /opt/ssl/server.key > /opt/ssl/server.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) [XX]:CN ### 国家名
State or Province Name (full name) []:BJ ### 省会
Locality Name (eg, city) [Default City]:BJ ### 城市
Organization Name (eg, company) [Default Company Ltd]:YONG ### 组织名
Organizational Unit Name (eg, section) []:cloud ###组织单位名
Common Name (eg, your name or your server's hostname) []:10.10.10.10 ### 服务器名字
Email Address []: ### 邮箱可选
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: ### 密码为空
An optional company name []: ###密码为空