
To run Nexus in standalone mode, you can run this command. Nexus provides a startup script at /opt/nexus/bin/nexus. Save and exit the file once you have made the changes. To for example, to set it to 1024MB -Xms1024m Replace the default values for the lines -Xms2703m If you have less memory, you can reduce it by editing the file /opt/nexus/bin/nexus.vmoptions and setting a lower value, for demo purposes. The default minimum JVM heap for Nexus is 2037MB with maximum recommended being 4G. Set the proper ownership of the nexus directory chown -R nexus: /opt/nexus Adjust the Nexus Memory Heap Size mkdir /opt/nexus tar xzf nexus-3.29. -C /opt/nexus -strip-components=1Ĭhecking the contents of the /opt/nexus directory ls /opt/nexus bin deploy etc lib nexus3 NOTICE.txt OSS-LICENSE.txt PRO-LICENSE.txt public system Navigate to the directory where you downloaded the Nexus tarball and extract it to the nexus user home directory, which in this guide is /opt/nexus. wget Install Nexus Repository Manager on Ubuntu 20.04 Extract Nexus Repository OSS tarball Be sure to get the link to the latest version from downloads page. Note that this downloads the current stable release version of Nexus, 3.29.2-02, as of this writing.

You can simply obtain the link and pull the tarball using wget command as shown below.


Next, navigate to Nexus repository OSS downloads page, register for an account and download Nexus repository OSS for Unix tarball. echo "nexus ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nexus Download Nexus Repository OSS Tarball Instead, create a system account for Nexus useradd -M -d /opt/nexus -s /bin/bash -r nexusĪllow the nexus user to run all commands with sudo without password. OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode) Create Dedicated Nexus System AccountĪs a security precaution, Nexus Repository Manager should NOT be run as the root user. Then install Java 8 apt install openjdk-8-jdkĬonfirm the installed version of Java java -version openjdk version "1.8.0_282" You can simply run the command below to install Java 8 on Ubuntu 20.04 apt update You can install full JDK or just the JRE. Nexus repository manager requires Java 8 Runtime Environment (JRE). Update system package cache apt update Install Java on Ubuntu 20.04 Ensure that the minimum requirements are met by your system before you can proceed to install Nexus repository manager on Ubuntu 20.04 as outlined on Nexus system requirements page, links provided below.
