First, download Nexus:
Cd/usr/local/src
wget http://download.sonatype.com/nexus/oss/nexus-xxxx-bundle.tar.gz
II. Installation and configuration authorization
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
Third, configuration/etc/init.d/nexus:
Vi/etc/init.d/nexus (Modify the following variable)
Example:
# Set this to the root of the Nexus installation
Nexus_home= "/var/app/nexus-xxx" (Not configured using default also can)
# Note-this would 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 being allocated prior to the user being changed.
Run_as_user=nexus (Specify a normal user of the system, start using a normal user)
Example:
Configure/usr/local/nexus/conf/nexus.properties
Vi/usr/local/nexus/conf/nexus.properties
Example:
# 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
Example:
Configure/VAR/APP/NEXUS-XXXX Permissions
Chown-r Nexus:nexus/usr/local/nexus
Backup Warehouse: Sonatype-work folder is backed up, or you can choose to back up only the most important two folder indexes (indexer) and warehouses (storage)
Restore Warehouse: Copy the backed-up sonatype-work files to the new server. Then modify the nexus/conf/nexus.properties configuration file to re-specify the repository's directory.
This article is from the "Miss Technical Support" blog, please be sure to keep this source http://huainian.blog.51cto.com/2602707/1792571
MAVEN Private Warehouse Library Migration