nexus配置https(在nexus上配置jks證書方式)
阿新 • • 發佈:2019-04-24
open algo xxxxxx manager args plt nss top pro nexus配置https(在nexus上配置jks證書方式):
nexus-context-path=/
cd /usr/local/nexus3/etc/ssl/
將已有的.crt和.key證書文件轉為p12格式:
openssl pkcs12 -export -out keystore.pkcs12 -inkey ming.key -in ming.crt
設置密碼
再將p12格式文件轉為.jks格式:
keytool -v -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks -deststoretype JKS
輸入上步設置的密碼並設置新密碼(可同上步密碼)
chown nexus:nexus /usr/local/nexus3/etc/ssl/keystore.jks
vi /usr/local/nexus3/etc/nexus-default.properties
DO NOT EDIT - CUSTOMIZATIONS BELONG IN $data-dir/etc/nexus.properties
##
Jetty section
application-port-ssl=8443
application-port=8081
application-host=0.0.0.0
nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-https.xml,${jetty.etc}/jetty-requestlog.xml
Nexus section
nexus-edition=nexus-pro-edition
nexus-features=\
nexus-pro-feature
:wq
vi /usr/local/nexus3/etc/jetty/jetty-https.xml (xxxxx為上面設置的密碼)
<Set name="KeyStorePath"><Property name="ssl.etc"/>/keystore.jks</Set> <Set name="KeyStorePassword">xxxx</Set> <Set name="KeyManagerPassword">xxxxxx</Set> <Set name="TrustStorePath"><Property name="ssl.etc"/>/keystore.jks</Set> <Set name="TrustStorePassword">xxxxx</Set> <Set name="EndpointIdentificationAlgorithm"></Set>
:wq
/usr/local/nexus3/bin/nexus stop
/usr/local/nexus3/bin/nexus start
netstat -nplt | grep 8443
nexus配置https(在nexus上配置jks證書方式)