1. 程式人生 > >linux搭建maven私服

linux搭建maven私服

下載 nexus

https://www.sonatype.com/download-oss-sonatype

All platforms - Nexus Repository Manager OSS 2.x - bundle.tar.gz安裝包
解壓
 # cd /usr/local
 # mkdir nexus
 # tar -xzvf nexus-2.11.2-03-bundle.tar.gz -C nexus
 # cd nexus
 # ls
  nexus-2.11.2-03   sonatype-work
 修改配置檔案
 # cd nexus-2.11.2-03/conf
 # vi nexus.properties
 #Jetty section
 application-port=8081      ##修改Jetty埠號 預設8081
 儲存以上修改

 配置使用者
# vi /usr/local/nexus/nexus-2.11.2-03/bin/nexus

#RUN_AS_USER=

RUN_AS_USER=root

儲存以上修改




若有設定防火牆,需前往修改防火牆配置並重啟防火牆


systemctl stop firewalld.service 關閉防火牆
systemctl disable firewalld.service 禁止防火牆開機啟動


firewall-cmd --state 檢視狀態 
not running


啟動nexus




# /usr/local/nexus/nexus-2.11.2-03/bin/nexus start




****************************************




WARNING - NOT RECOMMENDED TO RUN AS ROOT




****************************************




Starting Nexus OSS...




Started Nexus OSS.




在瀏覽器開啟:http://ip:8081/nexus,登入:使用者名稱admin  預設密碼:admin123