Saturday, July 30, 2022

How To Install Nexus on Ubuntu-22.0.4 Operating System?

 Prerequisites 

  • Java OpenJDK
  • Ubuntu Server with minimum resources 2cpu - 4GB storage T2-medium 
  • open security port of nexus port 8081 from any where under edit inbound rules

*Lets Start the process:

  • 1st login to server ubuntu 

  • sudo apt update -y 

  • sudo apt-get install openjdk-8-jdk  -y 

  • java -version

  • cd  /opt

  • sudo wget https://download.sonatype.com/nexus/3/nexus-3.41.0-01-unix.tar.gz

  • sudo  tar  -zxvf  nexus-3.41.0-01-unix.tar.gz

  • ls

  • sudo rm  -rf  nexus-3.41.0-01-unix.tar.gz

  • sudo mv /opt/nexus-3.41.0-01  /opt/nexus

  • sudo adduser nexus

  • sudo visudo
  • After Moving the this file add the data as shown below and Press CLT+X & Y Enter

  • sudo chown -R nexus:nexus  /opt/nexus

  • sudo chown -R nexus:nexus /opt/sonatype-work

  • sudo nano /opt/nexus/bin/nexus.rc

  • sudo nano /etc/systemd/system/nexus.service
  • [Unit]
    Description=nexus service
    After=network.target
    [Service]
    Type=forking
    LimitNOFILE=65536
    ExecStart=/opt/nexus/bin/nexus start
    ExecStop=/opt/nexus/bin/nexus stop
    User=nexus
    Restart=on-abort
    [Install]
    WantedBy=multi-user.target
  • sudo systemctl start nexus
  • sudo systemctl enable nexus
  • sudo systemctl status nexus
  • Next Move to AWS Portal and Then Open The Port on Security Gruops of The Nexus-Server Under Edit-Inbound Rule Add rule 8081


  • Then Copy Public-IP of Nexus Server Move to Browser and paste it along with port number like shown Ex: 13.126.173.131:8081
  • Then Click On sign-In from Portal like shown below  
  • Then copy the file location using cat it will display the admin password from server like shown
  • Then Copy The admin Password from Server like shown above and simply sign-in 
  • Next Chnage the Password and ADD New Password


  • Are You Interested To Learn DevOps Book Your Slot Today
    Trainer: Subhan Shaik
    Contact: +91- 7995165865
  • No comments:

    Post a Comment