SSL & Root CA 實作
Step.1 產生 Root CA
cd /usr/share/ssl/misc
./CA -newca
輸入路徑,不輸入Enter跳過,預設路徑為
/usr/share/ssl/misc/demoCA/cacert.pem
輸入密碼,請牢記, 如果忘記, 以後你便無法簽發憑證, 除非重新產生Root CA
再打一次
輸入CA的資料,不要輸入你的網站的資料,這是簽發憑證中心,不是你申請憑證網站
之後你會有兩個檔案
Root CA 憑證 usr/share/ssl/misc/demoCA/cacert.pem
Root CA Private Key /usr/share/ssl/misc/demoCA/private/cakey.pem
Step.2 產生使用者憑證(你的Server要申請憑證)
cd /usr/share/ssl/misc
./CA -newreq
跟產生 CA 鎖要輸入的資料差不多, 只有 CN 一定要正確, 其他就看你了
Step.3 分離憑證申請書以及 Private Key
head -18 newreq.pem > private.key
取得前18行為priveate.key
sed 1,18d newreq.pem > newreq.pem.1
mv newreq.pem.1 newreq.pem
刪除申請書的前18行
openssl rsa -in private.key -out server.key
拿掉申請憑證時所設定的密碼,如果你是要給 apache 用的話,
你不希望每次啟動跟都要打一次密碼的話, 請拿掉.
Step.4 CA 對憑證申請書進行簽章
cd /usr/share/ssl/misc
./CA -sign (輸入當初設定 Root CA 時所設的密碼)
sed 1,45d newcert.pem > /usr/share/ssl/certs/dovecot.pem
cp server.key /usr/share/ssl/private/dovecot.pem
重新啟動 dovecot , 以及刪除 /usr/share/ssl/misc
下所產生的 newcert.pem newreq.pem private.key server.key
/usr/share/ssl/certs/dovecot.pem
這個檔案複製下來到 user 端改為 *.crt 匯入收信程式的憑證即可~
ps. 如果要更改憑證有效日期在簽章憑證之前請修改
/usr/share/ssl/openssl.conf 將 default_days 修改成你要的有效時間



迴響 由 nickey — 七月 27, 2010 at 11:36 下午
請問一下Red Hat Cluster Suite 其中一台服務掛了另外一台是如何接手的? 這兩台應該試不同IP 吧? 那DNS 不是只有指向一台嗎?
support@tweb.tw
[ 引用 ]迴響 由 roach — 七月 29, 2010 at 9:57 下午
每一台cluster都有兩個IP,會互相偵測對方是否存在,如果對方不存在會透過第三方的方式去對那台做電源的控管,然後接著將服務接手,而另外一台重開機後得知已經有其他機器接手服務後就不會啟動那組ip與服務
[ 引用 ]