cd /usr/local/nginx/conf
首先要有openssl,没有需要安装
rpm -qf which openssl
openssl-1.0.2k-8.el7.x86_64
openssl genrsa -des3 -out tmp.key 2048 //rsa形式的key文件为私钥
openssl rsa -in tmp.key -out aminglinux.key //-in转换key,取消密码 -out输出的
rm -f tmp.key
openssl req -new -key aminglinux.key -out aminglinux.csr //生成证书请求文件,需要拿这个文件和私钥一起生产公钥文件
openssl x509 -req -days 365 -in aminglinux.csr -signkey aminglinux.key -out aminglinux.crt
这里的aminglinux.crt为公钥
转载于:https://blog.51cto.com/lsxme/2058937
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态