Monday, March 12, 2018

Install Nexus on Ubuntu - Install Nexus 3 on Ubuntu 16.0.4 - How to set up Nexus on Ubuntu server?

How to Install Nexus on Ubuntu:

SonaType Nexus3 is Java based application, it is used as binary repository manager. We need to install Java first.


sudo apt-get update 
sudo apt-get install default-jdk -y

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

Download Nexus

sudo wget

Extract Nexus

sudo tar -xvf nexus-3.0.2-02-unix.tar.gz
sudo mv nexus-3.0.2-02 nexus

Create a user called Nexus
sudo adduser nexus
give some password may be ad nexus, but do remember.

sudo chown -R nexus:nexus /opt/nexus
sudo vi /opt/nexus/bin/nexus.rc
change run_as_user="nexus"
sudo vi /opt/nexus/bin/nexus.vmoptions
Add all the below changes the file with below yellow highlighted entry:


sudo ln -s /opt/nexus/bin/nexus /etc/init.d/nexus

sudo su - nexus
give password for nexus which was nexus per above
cd /opt/nexus/bin
./nexus start

./nexus status

it should show nexus is running..

if it says stopped, review the steps above. also navigate to logs by

cat /opt/nexus/nexus-data/log/nexus.log

look for any error.

It should say Nexus is running..If you Nexus stopped, review the steps above.
Once Nexus is successfully installed, you can access it in the browser by 

with user name/password is admin/admin123
you should see the home page of Nexus

No comments:

Post a Comment

Create Freestyle job in Jenkins | How to create build job in Jenkins to automate Java build and deployment of WAR into Tomcat | Bitbucket Jenkins Integration

Jenkins is popular open source Continuous integration tool. It was written entirely in Java. Jenkins is a self-contained automation server u...