Published on

Nexus Artifact Repository installation guide on Ubuntu Server


Install Nexus Artifact Repository on Ubuntu Server

Create Ubuntu Server (Droplet, EC2, Linode, etc.) - min 4GB RAM & 2 CPUs Open SSH port 22, 8081

Nexus Installation Guide on Ubuntu

Update the package list:

sudo apt update

Install OpenJDK 8:

sudo apt install openjdk-8-jre-headless

Install net-tools:

sudo apt install net-tools

Navigate to the /opt directory:

cd /opt

Download and extract Nexus:

sudo wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz
sudo tar -zxvf latest-unix.tar.gz

Create a Nexus user:

sudo adduser nexus

Set ownership for Nexus directories:

sudo chown -R nexus:nexus nexus-3.28.1-01
sudo chown -R nexus:nexus sonatype-work

Edit Nexus runtime configuration:

sudo vim nexus-3.28.1-01/bin/nexus.rc

Inside nexus.rc, set the run_as_user variable to "nexus".


Save and exit the editor.

Switch to the Nexus user:

sudo su - nexus

Start Nexus:

/opt/nexus-3.28.1-01/bin/nexus start

Check Nexus process status:

ps aux | grep nexus

Check Nexus port status:

netstat -lnpt

Now, Nexus should be up and running on your Ubuntu system. You can access the Nexus web interface by navigating to http://your_server_ip:8081 in a web browser.