sudo mv nexus-3.* nexus Recall that we created a nexus user. We must give this user ownership of both the application directory and the work directory.
Whether you are a DevOps engineer setting up a CI/CD pipeline or a developer looking to cache dependencies locally, mastering the process is the first step toward a more stable and efficient build environment.
sudo nano /opt/nexus/bin/nexus.rc Uncomment the run_as_user parameter and set it to your dedicated user:
sudo tar -xvzf latest-unix.tar.gz Optional: Rename the directory for easier management.
cd /opt sudo wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz Once downloaded, extract the tarball. This will create two directories: one containing the application files ( nexus-<version> ) and one containing the data and configuration ( sonatype-work ).
run_as_user="nexus" If your server has ample RAM, you should adjust the JVM heap settings to ensure Nexus runs smoothly. This is configured in the nexus.vmoptions file.