Install Nexus on RHEL

Following is the installation procedure for Nexus OSS on RHEL
Step-01: Update the cache and install basic tools
sudo su -
yum update
yum install wget lsof -y
Step-02: Download the latest Nexus OSS Binaries
cd /opt
wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
Step-03: Extract the binaries
tar -xvzf nexus-latest-bundle.tar.gz
rm nexus-latest-bundle.tar.gz
Step-04: Create a soft link for Nexus directory
ln -s nexus-2.12.0-01/ nexus
Step-05: Setup Home directory for nexus
export NEXUS_HOME=/opt/nexus
Step-06: Create Nexus user with restricted permissions
useradd -m nexus
Step-07: Change the ownership of the extracted nexus binaries
chown -R nexus:nexus /opt/nexus-2.12.0-01/
chown -R nexus:nexus /opt/sonatype-work
Step-08: Editing Nexus binary to run as service
vi /opt/nexus/bin/nexus
# Edit the following line in the nexus script
# Editing the NEXUS_HOME environmental variable
NEXUS_HOME="/opt/nexus"
# Editing the NEXUS USER environmental variable
RUN_AS_USER="nexus"
# Editing the NEXUS PID environmental variable
PIDDIR="/home/nexus"
#Note: Just edit the above three variables [NEXUS_HOME, RUN_AS_USER, PIDDIR] in the script
Step-09: Starting Nexus as a Service
cp /opt/nexus/bin/nexus /etc/init.d/nexus
Step-10: Changing the permissions of the script to make it executable
chmod 755 /etc/init.d/nexus
Step-11: Enabling the Nexus service settings
cd /etc/init.d
chkconfig --add nexus
chkconfig --level 345 nexus on
Step-12: Starting/stopping the Nexus server
service nexus start
service nexus stop
Step-13: Dashboard can be accessed at
http://IP_ADDRESS:8081/nexus
Categories