日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

centos7安装nexus3

發布時間:2024/8/1 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos7安装nexus3 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、下載nexus
wget https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/3/nexus-3.12.0-01-unix.tar.gz


2、解壓
tar -zxvf nexus-3.12.0-01-unix.tar.gz -C /usr/local/nexus/


3、啟動
cd /usr/local/nexus/nexus-3.12.0-01/bin
./nexus run &


看到“Started Sonatype Nexus OSS 3.12.0-01”啟動成功
http://192.168.1.121:8081
默認端口:8081
默認用戶名:admin
默認密碼:admin123


4、設置開機自啟動
vim /usr/lib/systemd/system/nexus.service


[Unit]
Description=nexus service


[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/usr/local/nexus/nexus-3.12.0-01/bin/nexus start
ExecReload=/usr/local/nexus/nexus-3.12.0-01/bin/nexus restart
ExecStop=/usr/local/nexus/nexus-3.12.0-01/bin/nexus stop
Restart=on-failure


[Install]
WantedBy=multi-user.target


服務加入開機啟動 systemctl enable nexus.service
重新加載配置文件 systemctl daemon-reload


5、修改nexus用戶root
vim bin/nexus.rc? =>? run_as_user="root"


6、修改jdk
vim bin/nexus? =>? INSTALL4J_JAVA_HOME_OVERRIDE=/usr/local/java/jdk1.8.0_91


7、修改默認端口
vim etc/nexus-default.properties? =>? application-port=8081


8、修改數據、日志存儲位置
vim bin/nexus.vmoptions


9、nexus手動更新索引
從http://repo.maven.apache.org/maven2/.index/ 找到需要下載的索引文件,下面幾個文件下載到同一目錄
http://repo.maven.apache.org/maven2/.index/nexus-maven-repository-index.gz
http://repo.maven.apache.org/maven2/.index/nexus-maven-repository-index.properties
indexer-cli下載地址:http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.maven.indexer%22%20AND%20a%3A%22indexer-cli%22


執行
java -jar indexer-cli-6.0.0.jar -u nexus-maven-repository-index.gz -d indexer
等待程序運行完成之后可以發現indexer文件夾下出現了很多文件,將這些文件放置到{nexus-home}/sonatype-work/nexus3/indexer/central-ctx目錄下
重新啟動nexus

總結

以上是生活随笔為你收集整理的centos7安装nexus3的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。