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.



Pre-requisites:
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 http://download.sonatype.com/nexus/3/nexus-3.23.0-03-unix.tar.gz

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:










-Xms512m
-Xmx512m
-XX:MaxDirectMemorySize=512m
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.

[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
User=nexus
Group=nexus
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target

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:

20 comments:

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

    ReplyDelete
  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

    ReplyDelete
  3. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
    mobile application development training online
    mobile app development course
    mobile application development course
    learn mobile application development
    mobile app development training
    app development training
    mobile application development training
    mobile app development course online
    online mobile application development

    ReplyDelete

  4. 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..

    ReplyDelete

  5. 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

    ReplyDelete

  6. That's great about what you have expressed in this clear cut blog in sense of SEO , and yes this would make a wonderful blog. Here's a lot of technical and educational information plotted as in your writings, it was more understandable and easy to read.
    Sounds like something people would want to read this blog really!keep writing…

    seo training classes
    seo training course
    seo training institute in chennai
    seo training institutes
    seo courses in chennai
    seo institutes in chennai
    seo classes in chennai
    seo training center in chennai

    ReplyDelete
  7. Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
    Digital Marketing Course In Kolkata
    Web Design Course In Kolkata

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. 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

    ReplyDelete
  10. 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


    ReplyDelete
  11. 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

    ReplyDelete
  12. I read your article it is very interesting and every concept is very clear, thank you so much for sharing. AWS Certification Course in Chennai

    ReplyDelete
  13. MAJOR168 is open for football betting today. There are many big camps together BTi SBOBET IBCBET CMD365 if you are looking for a football betting website. Do not miss this site, there is football, there are all sports in the world. คาสิโนออนไลน์. Betting is available 24 hours a day with the best odds per pair in Thailand. Guaranteed automatic deposit and withdrawal system 10 seconds.

    Live sports betting Online football betting Good price with every football match open for today online football betting SAGAME88 There are many big camps together, SBOBET IBCBET BTi CMD365, the only website complete in online football betting คาสิโนออนไลน์. There is every sport on the planet in here. With the automatic deposit and withdrawal system for 10 seconds, we have a live football system to watch every night.


    We offer a wide variety of services. Called him the only player to finish with everything else does not have to go to the web preview ufabet as online. Online casinos Baccarat online Online betting games, Slot online, and with new technology, you can play ufabet via mobile phone today. Mobile Baccarat, play online via the website


    Ufabet1688 of us again the way we are websites directly, not through a General Services, where customers will know it absolutely was extremely really no cheating possible on-site gambling online, it is ufabet1688 of us will hit prices.

    ReplyDelete
  14. Choose to bet on football with us There are more than 100 different sports to choose from, playing live every match for you to have fun 24 hours a day. There is an online casino, Baccarat, สมัคร ufa, Dragon Tiger, Sa Casino Sexy Bacarat, live broadcast directly to your hand 24 hours a day.

    ReplyDelete
  15. 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.บาคาร่า
    ufa
    ufabet
    แทงบอล
    แทงบอล
    แทงบอล

    ReplyDelete