資源描述:
《centos openssl 安裝配置》由會(huì)員上傳分享,免費(fèi)在線(xiàn)閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(kù)。
1、CentOS下Apache2.2+OpenSSL0.9安裝配置系統(tǒng)版本:CentOSrelease5.5(Final)軟件:httpd-2.2.22.tar.gz,openssl-0.9.8e.tar.gz1.首先用ssh上傳到centos虛擬機(jī)器中[root@cacti~]#tar-zxvfhttpd-2.2.22.tar.gz[root@cacti~]#tar-zxvfopenssl-0.9.8e.tar.gz2.首先安裝openssl[root@cactiopenssl-0.9.8e]#./config--prefix=/usr/local/ssl//配
2、置路徑為/usr/local/ssl目錄下[root@cactiopenssl-0.9.8e]#make&&makeinstall//安裝openssl3.安裝apache2.2[root@cactihttpd-2.2.22]#./configure--prefix=/usr/local/apache--enable-so--enable-ssl--with-ssl=/usr/local/ssl//如果需要加別的參數(shù)也是可以的可以用./configure--help查看其它參數(shù)。[root@cactihttpd-2.2.22]#make&&makeinstal
3、l//安裝apache4.[root@cacti~]#cd/usr/local/apache/conf/[root@cacti~]#vihttpd.conf#Secure(SSL/TLS)connectionsIncludeconf/extra/httpd-ssl.conf//把這個(gè)井號(hào)去掉,默認(rèn)路徑也可以修改5.[root@cactiextra]#cdextra進(jìn)入extra目錄找到httpd.ssl.conf[root@cactiextra]#cphttpd.ssl.confhttpd.ssl.conf.backup//備份一份[root@cactiext
4、ra]#cathttpd.ssl.conf
5、grep-v"#">httpd.ssl.conf//把井號(hào)去掉便于查找。[root@cactiextra]#vihttpd.ssl.conf//打開(kāi)httpd.ssl.conf文件。DocumentRoot"/usr/local/apache/htdocs"ServerNamewww.example.com:443ServerAdminyou@example.comErrorLog"/usr/local/apache/logs/error_log"TransferLog"/usr/local/apache/logs/
6、access_log"SSLEngineonSSLProtocolall-SSLv2SSLCipherSuiteHIGH:MEDIUM:!aNULL:!MD5SSLCertificateFile"/usr/local/apache/conf/server.cert"http://這里可以修改默認(rèn)路徑和后綴名。SSLCertificateKeyFile"/usr/local/apache/conf/server.key"6.[root@cacticonf]#cd/usr/local/apache/conf//進(jìn)入conf路徑生成密匙[root@cacticonf]#ope
7、nsslgenrsa-des3-outserver.key1024//生成服務(wù)器私鑰:運(yùn)行openssl命令,生成1024、2048位長(zhǎng)的私鑰server.key文件。如果您需要對(duì)server.key添加保護(hù)密碼,請(qǐng)使用-des3擴(kuò)展命令。Windows環(huán)境下不支持加密格式私鑰,Linux環(huán)境下使用加密格式私鑰時(shí),每次重啟Apache都需要您輸入該私鑰密碼(例:opensslgenrsa-des3-outserver.key2048)。GeneratingRSAprivatekey,1024bitlongmodulus....................+
8、+++++.................................++++++eis65537(0x10001)Enterpassphraseforserver.key://輸入密碼Verifying-Enterpassphraseforserver.key:[root@cacticonf]#opensslreq-new-keyserver.key-outserver.crt//生成服務(wù)器證書(shū)請(qǐng)求,并按要求填些相關(guān)證書(shū)信息:Enterpassphraseforserver.key:Youareabouttobeaskedtoenterinformat
9、ionthatwillbeincorp