Setting up a private remote Maven repository - tooltwist/documentation GitHub Wiki

Step 1 - Create a new account

On the remote server, log on as root and create a new user nexus.

adduser nexus
passwd nexus

Log on as that new user.

Step 2 - Install Nexus

Download nexus.zip from http://www.sonatype.org/nexus/go. (Replace version number below with latest version)

wget www.sonatype.org/downloads/nexus-2.3.1-bundle.tar.gz
tar xzvf /tmp/nexus-2.3.1-bundle.tar.gz
ln -s nexus-2.3.1-01 nexus

Step 3 - Open port 8081 through the firewall.

Login as root
cd /etc/sysconfig
vi iptables

Add these 4 lines below the Port 22 line.

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT

Save and exit. Reload the Iptables.

iptables-restore < /etc/sysconfig/iptables

Step 4 - Start the server and test.

~/nexus/bin/nexus start

Start Nexus automatically upon machine boot

Log on as root, then follow the instructions at http://www.sonatype.com/books/nexus-book/reference/install-sect-service.html. The following are example values changed in /etc/init.d/nexus:

NEXUS_HOME="/home/nexus/nexus"
RUN_AS_USER=nexus
PIDDIR="/home/nexus/nexus"

Start the service now

service nexus start

Then check you can access Nexus from your browser at http://50.56.244.123:8081/nexus. If you encounter any problems, check the log file.

tail ~/nexus/logs/wrapper.log

Links

http://www.sonatype.com/books/nexus-book/reference/index.html
http://www.sonatype.org
http://alexander.holbreich.org/2012/10/sonatype-nexus-setup/

⚠️ **GitHub.com Fallback** ⚠️