Linux Centos7下生成https自簽名證書(shū)
1、安裝openssl
yum install openssl
2、生成帶密碼的私有秘鑰文件
openssl genrsa -des3 -out server.key 2048
使用帶密碼的私有秘鑰文件時(shí)需要輸入密碼,這里直接輸入:123456

3、生成不帶密碼的私有秘鑰文件
openssl rsa -in server.key -out server.key
4、生成證書(shū)文件
openssl req -new -x509 -key server.key -out server-ca.crt -days 3650
這里需要輸入信息,隨便填寫(xiě)即可

5、生成證書(shū)基本信息server.csr
openssl req -new -key server.key -out server.csr

6、生成簽名證書(shū)
openssl x509 -req -days 3650 -in server.csr -CA server-ca.crt -CAkey server.key -CAcreateserial -out server.crt

7、生成pem格式證書(shū)(用于導(dǎo)入導(dǎo)出)
openssl pkcs12 -export -out server.pfx -inkey server.key -in server.crt
這里讓輸入密碼直接為空

8、生成pfx證書(shū)
cat server.crt server.key > server.pem

知識(shí)補(bǔ)充
CentOS7下ssl自簽名證書(shū)
生成帶密碼的私有秘鑰文件
openssl genrsa -des3 -out server.key 2048
生成不帶密碼的私有秘鑰文件
openssl rsa -in server.key -out server.key
生成證書(shū)文件
openssl req -new -x509 -key server.key -out server-ca.crt -days 3650
生成證書(shū)基本信息server.csr
openssl req -new -key server.key -out server.csr
生成簽名證書(shū)
openssl x509 -req -days 3650 -in server.csr -CA server-ca.crt -CAkey server.key -CAcreateserial -out server.crt
生成pem格式證書(shū)(用于導(dǎo)入導(dǎo)出)
openssl pkcs12 -export -out server.pfx -inkey server.key -in server.crt
生成pfx證書(shū)
cat server.crt server.key > server.pem
到此這篇關(guān)于Linux Centos7下生成https自簽名證書(shū)的文章就介紹到這了,更多相關(guān)Centos7生成https自簽名證書(shū)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Ubuntu18.04 linux系統(tǒng)安裝JDK與Mysql的方法
這篇文章主要介紹了Ubuntu18.04 linux系統(tǒng)安裝JDK與Mysql的方法,需要的朋友可以參考下2020-02-02
Linux中利用Vim對(duì)文件進(jìn)行密碼保護(hù)的方法詳解
這篇文章主要給大家介紹了在Linux中利用Vim對(duì)文件進(jìn)行密碼保護(hù)的相關(guān)資料,文中介紹的非常詳細(xì),對(duì)大家具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起看看吧。2017-06-06
linux 定時(shí)休眠的實(shí)現(xiàn)思路
這篇文章主要介紹了linux 定時(shí)休眠的實(shí)現(xiàn)思路,休眠的類(lèi)型有三種類(lèi)型,文章對(duì)每種類(lèi)型介紹的都很詳細(xì),需要的朋友可以參考下2018-07-07
linux上TCP connection timeout問(wèn)題解決辦法
這篇文章主要介紹了 linux上TCP connection timeout問(wèn)題解決辦法的相關(guān)資料,需要的朋友可以參考下2017-04-04
在linux (centos)上使用puppeteer實(shí)現(xiàn)網(wǎng)頁(yè)截圖功能
這篇文章主要介紹了在linux (centos)上使用puppeteer實(shí)現(xiàn)網(wǎng)頁(yè)截圖功能,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-11-11

