记性现在越来越不行了,记录下来!
##安装软件
yum install openssl
#安装完成后,进入到/etc/pki/tls/private 私钥目录下面[自己生成一个私钥]
1 | /usr/bin/openssl genrsa -aes128 2048 > /etc/pki/tls/private/localhost.key |
#然后进入证书目录,新签名一个证书:
1 2 3 | cd ../certs /usr/bin/openssl req -utf8 -new -key /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt |
Tips:
在 /etc/pki/tls/certs/ 目录下面有一个Makefile脚本
可以直接make testcert自动生成