{"id":383,"date":"2026-10-14T01:51:34","date_gmt":"2026-10-14T01:51:34","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2014\/11\/03\/install-sonatype-nexus-community-version\/"},"modified":"2026-10-14T01:51:34","modified_gmt":"2026-10-14T01:51:34","slug":"install-sonatype-nexus-community-version","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/install-sonatype-nexus-community-version\/","title":{"rendered":"Install Sonatype Nexus Repository OSS (Community) on Linux: Updated Step-by-Step Guide"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Originally published on 2014-11-03; fully revised and updated.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2014\/11\/sonatype-nexus-community-ve.png\" alt=\"Sonatype Nexus Community installation\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Nexus OSS installation workflow<\/h2>\n\n\n\n<pre class=\"mermaid\">\nflowchart TD\n    A[Prepare Linux host] --> B[Install Java runtime]\n    B --> C[Download Nexus archive]\n    C --> D[Extract under opt]\n    D --> E[Start Nexus from bin script]\n    E --> F[Check service status]\n    F --> G[Open UI on port 8081]\n    G --> H[Sign in and secure admin account]\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Choose package format and reference docs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The original post pointed to Sonatype download and support pages. Keep these links handy while installing: <a href=\"http:\/\/www.sonatype.org\/nexus\/go\/\">Sonatype Nexus go page<\/a>, <a href=\"https:\/\/support.sonatype.com\/entries\/20673251-Installing-Nexus-OSS\">Installing Nexus OSS<\/a>, <a href=\"https:\/\/support.sonatype.com\/entries\/20673271-Starting-Nexus-from-the-Command-Line\">Starting Nexus from the Command Line<\/a>, <a href=\"https:\/\/support.sonatype.com\/entries\/23031188-How-do-I-upgrade-Nexus-OSS\">Upgrade Nexus OSS<\/a>, and the historical book reference <a href=\"https:\/\/books.sonatype.com\/nexus-book\/reference\/installing.html\">Nexus book install page<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Package<\/th><th>Best for<\/th><th>Download<\/th><\/tr><\/thead><tbody><tr><td>Linux TGZ<\/td><td>Server installs and shell-based automation<\/td><td><a href=\"http:\/\/download.sonatype.com\/nexus\/3\/latest-unix.tar.gz\">latest-unix.tar.gz<\/a><\/td><\/tr><tr><td>Windows ZIP<\/td><td>Manual Windows setup<\/td><td><a href=\"http:\/\/download.sonatype.com\/nexus\/oss\/nexus-latest-bundle.zip\">nexus-latest-bundle.zip<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Install Java on the host<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Check whether Java is already installed.<\/li><li>Prefer OS package manager installs for patching and lifecycle management.<\/li><li>Use 64-bit Java for server deployments.<\/li><\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Verify Java<\/span>\njava -version\n\n<span class=\"hljs-comment\"># Example on Debian or Ubuntu<\/span>\nsudo apt-get update &amp;&amp; sudo apt-get install -y <span class=\"hljs-keyword\">default<\/span>-jre wget tar\njava -version<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Legacy Oracle JDK 8 tarball commands from the original post<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The original article used Oracle JDK 8u66 direct downloads with cookie headers. These commands are preserved here for historical reference.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># 64-bit (legacy)<\/span>\ncd \/opt\/\nwget --no-cookies --no-check-certificate --header <span class=\"hljs-string\">\"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie\"<\/span> <span class=\"hljs-string\">\"http:\/\/download.oracle.com\/otn-pub\/java\/jdk\/8u66-b17\/jdk-8u66-linux-x64.tar.gz\"<\/span>\ntar xzf jdk<span class=\"hljs-number\">-8<\/span>u66-linux-x64.tar.gz\n\n<span class=\"hljs-comment\"># 32-bit (legacy)<\/span>\ncd \/opt\/\nwget --no-cookies --no-check-certificate --header <span class=\"hljs-string\">\"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie\"<\/span> <span class=\"hljs-string\">\"http:\/\/download.oracle.com\/otn-pub\/java\/jdk\/8u66-b17\/jdk-8u66-linux-i586.tar.gz\"<\/span>\ntar xzf jdk<span class=\"hljs-number\">-8<\/span>u66-linux-i586.tar.gz<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Download and start Nexus Repository OSS (Linux TGZ)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is the archive-based flow from the original post, cleaned up for repeatable operations.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Optional dependency install (RHEL-family example)<\/span>\nsudo yum install -y wget tar\n\n<span class=\"hljs-comment\"># Download and extract Nexus<\/span>\ncd \/opt\/\nwget http:<span class=\"hljs-comment\">\/\/download.sonatype.com\/nexus\/3\/latest-unix.tar.gz<\/span>\ntar -xzf latest-unix.tar.gz\nmv nexus-* nexus\n\n<span class=\"hljs-comment\"># Start and check status<\/span>\ncd \/opt\/nexus\/bin\n.\/nexus start\n.\/nexus status<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">To see all supported control commands, run the Nexus script without parameters (as referenced in the original post and Sonatype command-line page).<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs language-bash\">cd \/opt\/nexus\/bin\n.\/nexus<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Access the UI and perform first login checks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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 <code>\/nexus<\/code> context path.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Typical URL: <a href=\"http:\/\/localhost:8081\/\">http:\/\/localhost:8081\/<\/a><\/li><li>Legacy URL pattern seen in older docs: <a href=\"http:\/\/localhost:8081\/nexus\">http:\/\/localhost:8081\/nexus<\/a><\/li><li>Very old default credentials were <strong>admin\/admin123<\/strong>.<\/li><li>Recent Nexus releases may require reading an initial admin password file before first sign-in.<\/li><\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Example path used by many Nexus 3 installations<\/span>\ncat \/opt\/sonatype-work\/nexus3\/admin.password<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Common control commands<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Use<\/th><\/tr><\/thead><tbody><tr><td>.\/nexus start<\/td><td>Start Nexus in background mode<\/td><\/tr><tr><td>.\/nexus stop<\/td><td>Stop Nexus process<\/td><\/tr><tr><td>.\/nexus restart<\/td><td>Restart service<\/td><\/tr><tr><td>.\/nexus status<\/td><td>Check running state<\/td><\/tr><tr><td>.\/nexus run<\/td><td>Run in foreground for troubleshooting<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs language-bash\">cd \/opt\/nexus\/bin\n.\/nexus status\n.\/nexus restart<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Upgrade planning (safe high-level approach)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use Sonatype guidance for version-specific upgrades: <a href=\"https:\/\/support.sonatype.com\/entries\/23031188-How-do-I-upgrade-Nexus-OSS\">How do I upgrade Nexus OSS<\/a>. A safe baseline process is:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Back up your data directory before any change.<\/li><li>Stop Nexus cleanly.<\/li><li>Deploy the new Nexus application directory.<\/li><li>Keep or reattach the existing data directory.<\/li><li>Start and validate repository health and user access.<\/li><\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php language-bash\"><span class=\"hljs-comment\"># Example backup command (adjust paths for your host)<\/span>\nsudo tar -czf \/<span class=\"hljs-keyword\">var<\/span>\/backups\/nexus-data-$(date +%F).tar.gz \/opt\/sonatype-work<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Common pitfalls and best practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Do not assume old defaults like <strong>admin\/admin123<\/strong> still apply.<\/li><li>Avoid 32-bit Java for current server deployments.<\/li><li>Validate Java compatibility against your exact Nexus release.<\/li><li>Treat download URLs in legacy posts as potentially moved or redirected.<\/li><li>Back up data before upgrades; never upgrade without rollback options.<\/li><li>Document your install paths so operations teams can troubleshoot quickly.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you need a visual reference from the original post context, the linked YouTube URL is: <a href=\"https:\/\/www.youtube.com\/watch?v=ZCfrNvu6nMc\">https:\/\/www.youtube.com\/watch?v=ZCfrNvu6nMc<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This updated guide modernizes a legacy Nexus Community install post into a clear Linux runbook. It covers Java setup, Nexus download\/start, first login checks, control commands, and upgrade-safe practices.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[157],"tags":[5008,254,237,426,465,5009,570],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-sonatype-nexus","tag-community-edition","tag-configure","tag-install","tag-nexus","tag-rhel","tag-sonatype","tag-sonatype-nexus"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=383"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":79263,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/383\/revisions\/79263"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}