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.

Java

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 https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.0.2-02-unix.tar.gz

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:



-Xms256M
-Xmx256M
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-Djava.net.preferIPv4Stack=true
-Dkaraf.home=.
-Dkaraf.base=.
-Dkaraf.etc=etc
-Djava.util.logging.config.file=etc/java.util.logging.properties
-Dkaraf.data=/opt/nexus/nexus-data
-Djava.io.tmpdir=data/tmp
-Dkaraf.startLocalConsole=false

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

sudo su - nexus
give password for nexus which was nexus per above
type 
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

1 comment:

  1. As find a way to|you presumably can} see, the cellular app bears a strong resemblance to 룰렛 the web site}. It’s somewhat extra compact, of course, to account for running on a lot smaller} display screen, however all the same features are available. The on line casino sport library is sortable via the silver menu about a third of the best way|the means in which} down the web page. All of the games run smoothly, with free demo options out there so that, for example, find a way to|you presumably can} learn the ropes on model new} slot earlier than placing your individual money on the line. Graphically it’s an aesthetically pleasing experience, too.

    ReplyDelete

AWS, Azure Cloud and DevOps Coaching Online Classes | Feb 2023 Schedule

Are you in IT? Tired of your work? Are you not able to make any good progress in your career?  Are you not having a job? Looking for a break...