Originally published on 2014-11-03; fully revised and updated.
This guide explains how to install and run Sonatype Nexus Repository OSS (community edition) on Linux using the archive-based approach from the original post, with cleaner steps and operational guardrails. You will learn the install workflow, package choices, startup commands, first-login checks, and safe upgrade preparation.

Nexus OSS installation workflow
flowchart TD
A[Prepare Linux host] --> B[Install Java runtime]
B --> C[Download Nexus archive]
C --> D[Extract under opt]
D --> E[Start Nexus from bin script]
E --> F[Check service status]
F --> G[Open UI on port 8081]
G --> H[Sign in and secure admin account]
Choose package format and reference docs
The original post pointed to Sonatype download and support pages. Keep these links handy while installing: Sonatype Nexus go page, Installing Nexus OSS, Starting Nexus from the Command Line, Upgrade Nexus OSS, and the historical book reference Nexus book install page.
| Package | Best for | Download |
|---|---|---|
| Linux TGZ | Server installs and shell-based automation | latest-unix.tar.gz |
| Windows ZIP | Manual Windows setup | nexus-latest-bundle.zip |
Install Java on the host
Nexus requires Java, but the exact supported Java version depends on the Nexus release you deploy. Validate compatibility in Sonatype release documentation before production rollout.
- Check whether Java is already installed.
- Prefer OS package manager installs for patching and lifecycle management.
- Use 64-bit Java for server deployments.
# Verify Java
java -version
# Example on Debian or Ubuntu
sudo apt-get update && sudo apt-get install -y default-jre wget tar
java -versionCode language: PHP (php)
Legacy Oracle JDK 8 tarball commands from the original post
The original article used Oracle JDK 8u66 direct downloads with cookie headers. These commands are preserved here for historical reference.
# 64-bit (legacy)
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz"
tar xzf jdk-8u66-linux-x64.tar.gz
# 32-bit (legacy)
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-i586.tar.gz"
tar xzf jdk-8u66-linux-i586.tar.gzCode language: PHP (php)
Download and start Nexus Repository OSS (Linux TGZ)
This is the archive-based flow from the original post, cleaned up for repeatable operations.
# Optional dependency install (RHEL-family example)
sudo yum install -y wget tar
# Download and extract Nexus
cd /opt/
wget http://download.sonatype.com/nexus/3/latest-unix.tar.gz
tar -xzf latest-unix.tar.gz
mv nexus-* nexus
# Start and check status
cd /opt/nexus/bin
./nexus start
./nexus statusCode language: PHP (php)
To see all supported control commands, run the Nexus script without parameters (as referenced in the original post and Sonatype command-line page).
cd /opt/nexus/bin
./nexus
Access the UI and perform first login checks
After startup, open the web UI on port 8081. In many modern Nexus 3 installs the root path is used, while some legacy documentation references a /nexus context path.
- Typical URL: http://localhost:8081/
- Legacy URL pattern seen in older docs: http://localhost:8081/nexus
- Very old default credentials were admin/admin123.
- Recent Nexus releases may require reading an initial admin password file before first sign-in.
# Example path used by many Nexus 3 installations
cat /opt/sonatype-work/nexus3/admin.passwordCode language: PHP (php)
Common control commands
| Command | Use |
|---|---|
| ./nexus start | Start Nexus in background mode |
| ./nexus stop | Stop Nexus process |
| ./nexus restart | Restart service |
| ./nexus status | Check running state |
| ./nexus run | Run in foreground for troubleshooting |
cd /opt/nexus/bin
./nexus status
./nexus restart
Upgrade planning (safe high-level approach)
Use Sonatype guidance for version-specific upgrades: How do I upgrade Nexus OSS. A safe baseline process is:
- Back up your data directory before any change.
- Stop Nexus cleanly.
- Deploy the new Nexus application directory.
- Keep or reattach the existing data directory.
- Start and validate repository health and user access.
# Example backup command (adjust paths for your host)
sudo tar -czf /var/backups/nexus-data-$(date +%F).tar.gz /opt/sonatype-workCode language: PHP (php)
Common pitfalls and best practices
- Do not assume old defaults like admin/admin123 still apply.
- Avoid 32-bit Java for current server deployments.
- Validate Java compatibility against your exact Nexus release.
- Treat download URLs in legacy posts as potentially moved or redirected.
- Back up data before upgrades; never upgrade without rollback options.
- Document your install paths so operations teams can troubleshoot quickly.
If you need a visual reference from the original post context, the linked YouTube URL is: https://www.youtube.com/watch?v=ZCfrNvu6nMc.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals
A reliable Nexus setup starts with planning storage, permissions, and backup needs before hosting important packages. Keeping hosted and proxy repositories organized helps teams manage internal artifacts and external dependencies. It is also important to secure administrator access and use suitable network restrictions. Testing package uploads and downloads early can catch configuration issues before teams depend on the service. Regular backup and restore checks help protect artifacts as the repository grows.