首页 > Web开发 > 详细

nexus配置https(在nexus上配置jks证书方式)

时间:2019-04-24 17:11:24      阅读:936      评论:0      收藏:0      [点我收藏+]
nexus配置https(在nexus上配置jks证书方式):

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-context-path=/

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证书方式)

原文:https://blog.51cto.com/yangzhiming/2384050

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!