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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

MAVEN 私有仓库库迁移

發布時間:2025/3/8 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MAVEN 私有仓库库迁移 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.


一、下載 Nexus:


cd /usr/local/src


wget http://download.sonatype.com/nexus/oss/nexus-xxxx-bundle.tar.gz


二、安裝配置授權?


cd /var/app/


sudo cp nexus-xxxx-bundle.tar.gz /var/app/


cd /var/app/


sudo tar xvzf nexus-xxxx-bundle.tar.gz


ln -s nexus-xxxx nexus


cp nexus/bin/nexus /etc/init.d/nexus


cd /etc/init.d


chmod 755 /etc/init.d/nexus



三、配置/etc/init.d/nexus:


vi /etc/init.d/nexus (修改如下變量)


示例:

# Set this to the root of the Nexus installation

NEXUS_HOME="/var/app/nexus-XXX"(不配置使用默認也可以)


# NOTE - This will set the user which is used to run the Wrapper as well as

# ?the JVM and is not useful in situations where a privileged resource or

# ?port needs to be allocated prior to the user being changed.

RUN_AS_USER=nexus (指定一個系統普通用戶、啟動使用普通用戶啟動)


示例:

配置/usr/local/nexus/conf/nexus.properties


vi /usr/local/nexus/conf/nexus.properties


示例:

# Jetty section

application-port=8081

application-host=0.0.0.0

nexus-webapp=${bundleBasedir}/nexus

nexus-webapp-context-path=/



# Nexus section

nexus-work=${bundleBasedir}/sonatype-work/nexus

runtime=${bundleBasedir}/nexus/WEB-INF



示例:

配置/var/app/nexus-xxxx權限


chown -R nexus:nexus /usr/local/nexus




備份倉庫:將sonatype-work文件夾整體備份即可,也可以選擇只備份最重要的兩個文件夾索引(indexer)和倉庫(storage)


還原倉庫:將備份好的sonatype-work文件拷貝到新的服務器中。然后修改nexus/conf/nexus.properties配置文件,重新指定倉庫的目錄。


轉載于:https://blog.51cto.com/huainian/1792570

總結

以上是生活随笔為你收集整理的MAVEN 私有仓库库迁移的全部內容,希望文章能夠幫你解決所遇到的問題。

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