安裝私服~~~
win & linux 網上教程很多,不在論述;
1,在線安裝index(下載很慢,且不1定能安裝成功)
??將Download Remote Indexes值改成true,點擊“save”后,點擊左側的“Administration”->”Scheduled Tasks”鏈接,如果沒有出現“Update Repositories Index”處于Running狀態,那末需要在Public Repositories行右擊,點擊”Update Index”。
??然后再點擊Schedule Tasks就能夠看到有任務處于Running狀態了。
??等到索引下載完成以后,就能夠在”Repositories”界面中,選擇Browser Index選項卡,可以看到Maven中央倉庫內容的樹形結構,以下圖所示。
2,離線安裝index
??首先將索引下載到本地,下載地址:https://pan.baidu.com/s/1hsFLKzU
解壓索引緊縮包,將里面內容全部拷貝
??關閉當前Nexus私服,打開Nexus目錄%Nexus_Home%\sonatype-work\nexus\indexer\central-ctx,首先刪除當前目錄里所有內容,然后粘貼所下載的索引,最后啟動Nexus私服,索引生效。
注:sonatype-work是nexus安裝包解壓后的文件夾(與Nexus2.0.6同級目錄)。也能夠自己修改sonatype-work的位置
修改%Nexus_HOME%/conf/nexus.properties
nexus-work=${bundleBasedir}/../../sonatype-work/nexus
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>A Local Nexus Server</name>
<url>http://ip:port/nexus/content/groups/public/</url>
</mirror>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>Nexus</name>
<url>http://ip:port/repository/maven-public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Nexus</name>
<url>http://ip:port/repository/maven-public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<!--加激活profile-->
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
遇到問題:中心倉庫的倉庫狀態報下面err
Remote automatically blocked and unavailable java.security.providerException:java.security.keyException
解決:升級nss
[root@localhost ~]# sudo yum upgrade nss
[root@localhost bin]# ./nexus stop
[root@localhost bin]# ./nexus start
nss:網絡安全服務(NSS)是1個旨在支持跨平臺的安全功能的客戶端和服務器利用程序的開發庫。與NSS內置的利用程序可以支持SSL v2和v3,TLS和的PKCS#5,PKCS#7的,的PKCS#11的PKCS#12的S / MIME,X.509 v3證書和其他安全標準