Nexus Repository OSS Server Installation


Nexus
For more information on the Nexus OSS Repository Server, visit sonatype.com


Description:


The world's only repository manager with FREE support for popular formats. Give your teams a single source of truth for every component they use. Provide universal coverage for all major package formats and types.


Pre-Requisites:


Install the packages that are needed to support Nexus Repository OSS


   COMPATABILITY NOTICE:
These instructions are only compatible with CentOS 7     and RHEL 7  


yum clean all
yum -y install sudo vim wget net-tools java-1.8.0-openjdk.x86_64


Create Installation Directory:


mkdir /opt/nexus
cd /opt/nexus


Download Nexus Repository OSS:


wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
tar -xzvf nexus-latest-bundle.tar.gz
ln -s nexus-3.0.0-03-unix.tar.gz nexus


Copy Init Script:


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


Change the Init Script:


Edit the /etc/init.d/nexus Init script, and edit the following line.

NEXUS_HOME="/opt/nexus/nexus"


Add the Nexus User.

useradd nexus


Set directory permissions:


chown -R nexus:nexus /opt/nexus/
chown nexus:nexus /etc/init.d/nexus


Add firewall rules:


firewall-cmd --zone=public --permanent --add-port=8081/tcp
firewall-cmd --reload


Set the application context:


Edit the /opt/nexus/nexus/conf/nexus.properties and set the webapp context. This will remove the virtual directory of nexus out of the URL Path.

nexus-webapp-context-path=/nexus


Start Nexus Service:


su nexus
/etc/init.d/nexus start
chkconfig nexus on


Login:


Open your web browser and go to the ip of the server.
http://1.2.3.4:8081


   Default Credentials:
username: admin
password: admin123


Post Requisites:



References:


Nexus Post Install Checklist