Install Latest Sonatype Nexus 3 on Ubuntu 22 using ansible
Sonatype Nexus is one of the best open-source artifact management tools. It is some tool that you cannot avoid in your CI/CD pipeline. It effectively manages deployable artifacts.
- Minimum 1 VCPU & 2 GB Memory
- Server firewall opened for port 22 & 8081
- OpenJDK 8
- All Nexus processes should run as a non-root nexus user.
- Update the
aptpackages - Install
java8 - allow firewall ports
22 and 8081 - Download the latest nexus in /opt directory
- Untar the downloaded file
- Rename the untared file to
nexus - create nexus group and user
- Create a service named
nexus - Change the ownership of nexus files to
nexususer - Create a nexus systemd unit file
/etc/systemd/system/nexus.service - Start and enable nexus service
- run
ansible-playbook nexus.yaml - Visit
http://<node ip>:8081 - Log in using default username
adminand password found inapp/sonatype-work/nexus3/admin.password
