 使用以下創建自簽憑證 ``` openssl req -newkey rsa:2048 -nodes -keyout nexus.key -x509 -days 365 -out nexus.crt ``` 創建問題如下 Country Name (2 letter code): 國家兩字字母代碼,如:TW。 State or Province Name (full name): 所在的州或省的全稱。例如:Taipei。 Locality Name (eg, city): 所在的城市名稱。例如Dazhi。 Organization Name (eg, company): 公司名称。 Organizational Unit Name (eg, section): 部门或單位名稱。 Common Name (e.g. server FQDN or YOUR name): 可以使用姓名或信箱。 Email Address: 您的信箱地址。 使用  ``` openssl pkcs12 -export -in nexus.crt -inkey nexus.key -out keystore.p12 -name myalias -CAfile ca.crt -caname root ``` 再將PKC12轉成jks  語法如下 ``` keytool -importkeystore -deststorepass changeit -destkeypass changeit -destkeystore keystore.jks -srckeystore keystore.p12 -srcstoretype pkcs12 -alias myalias ``` 到當前版本目錄底下開啟nexus-default.propertie 新增  ``` application-port-ssl=8443 ,${jetty.etc}/jetty-https.xml ``` 配置密碼 位置為: /opt/sonatype/nexus/nexus-3.69.0-02/etc/jetty/jetty-https.xml  ``` changeit ``` 檢測憑證內容 ``` keytool -list -v -keystore keystore.jks ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up