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 私有仓库库迁移的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 最近的日子,很惬意!
- 下一篇: LaTeX技巧205:使用split输入