Thursday, April 16, 2020

How to setup SonaType Nexus 3 on Redhat Enterprise Linux in EC2? Nexus installation on RedHat Linux - Install Nexus on RedHat Linux

Nexus is binary repository manager, used for storing build artifacts. We will eventually integrate Nexus with Jenkins for uploading WAR/EAR/JAR files there.

Here are the steps for installing Sonatype Nexus 3 in RHEL in EC2 on AWS. Please create a new Redhat EC2 instance with small type. Choose Redhat Enterprise 8.

Make sure you open port 8081 in AWS security group

Installation Steps:

sudo yum install wget -y

Download Open JDK
sudo yum install java-1.8.0-openjdk.x86_64 -y

Execute the below command to navigate to /opt directory by changing directory:
cd /opt

Download Nexus
sudo wget

Extract Nexus
sudo tar -xvf nexus-3.23.0-03-unix.tar.gz
sudo mv nexus-3.23.0-03 nexus

Create a user called Nexus
sudo adduser nexus

Change the ownership of nexus files and nexus data directory to nexus user.
sudo chown -R nexus:nexus /opt/nexus
sudo chown -R nexus:nexus /opt/sonatype-work

Configure to run as Nexus user
change as below screenshot by removing # and adding nexus
 sudo vi /opt/nexus/bin/nexus.rc

Modify memory settings in Nexus configuration file
sudo vi /opt/nexus/bin/nexus.vmoptions

Modify the above file as shown in red highlighted section:

after making changes, press wq! to come out of the file.

Configure Nexus to run as a service

sudo vi /etc/systemd/system/nexus.service
Copy the below content highlighted in green color.

Description=nexus service
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop

Create a link to Nexus
sudo ln -s /opt/nexus/bin/nexus /etc/init.d/nexus

Execute the following command to add nexus service to boot.

sudo chkconfig --add nexus
sudo chkconfig --levels 345 nexus on

Start Nexus
sudo service nexus start

Check whether Nexus service is running
sudo service nexus status

Check the logs to see if Nexus is running
tail -f /opt/sonatype-work/nexus3/log/nexus.log

You will see Nexus started..
If you Nexus stopped, review the steps above.

Now press Ctrl C to come out of this windows.

Once Nexus is successfully installed, you can access it in the browser by URL - http://public_dns_name:8081

Click on Sign in link
user name is admin and password can be found by executing below command:

sudo cat /opt/sonatype-work/nexus3/admin.password

Copy the password and click sign in.
Now setup admin password as admin123

you should see the home page of Nexus:

Please follow steps for integrating Nexus with Jenkins

Please watch my YouTube channel on demo on How to setup Nexus 3 on Red Hat Linux in AWS:


  1. can you post how to install latest version of sonatype nexus on redhat

  2. very good ideas and this was very useful for my professional oriented. Thanks for you provides a great post and I expect to you more information. Your written style is very impressed to me and I'm waiting for your updates...

    DevOps Training in Chennai
    Splunk Training in Chennai


  3. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog,i want to share some Information about learn splunk . keep updates regularly..


  4. Thanks for your extraordinary blog. Your idea for this was so brilliant. This would provide people with an excellent tally resource from someone who has experienced such issues. You would be coming at the subject from a different angle and people would appreciate your honesty and frankness. Good luck for your next blog!
    Tally ERP 9 Training
    tally classes
    Tally Training institute in Chennai
    Tally course in Chennai

  5. This comment has been removed by the author.

  6. You more likely than not experienced it multiple times: at whatever point you are needed to present some paper, you haven't the faintest idea how to move toward composing, what to expound, best Writing Tools

  7. Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here.

    python Training in chennai

    python Course in chennai

  8. The first step is for YOU to make a decision that developing your people to think, act, and make decisions like business owners is something you are committed to. Salesforce interview questions

  9. Internet slots (Slot Online) is actually the launch of a gambling machine. Slot machine As said before above Used to make electronic games called web based slots, due to the development era, people have left turned to gamble with one another by computers. Will draw slot games to make web based gambling games Via the web network system Which players are able to play through the slot plan or will perform Slots through the service provider's website Which online slots games are on hand in the kind of playing guidelines. It is similar to playing on a slot machine. Both realistic pictures as well as sounds are at the same time thrilling as they go to lounge in the casino ever.บาคาร่า

  10. This blog is very useful, Thanks for sharing with us. Are you looking for online GCSE tuition that can help you score high in your exams? Our GCSE online home tuition program is tailored to meet the individual needs of each student, with a focus on personalized attention and interactive learning. So why wait? Sign up for Ziyyara's GCSE online tuition today and get a Free Demo.

    For more info contact +91-9654271931 | UAE +971- 505593798 or visit GCSE Online Home Tuition