Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

Shubh Walsh




Posted Questions



Wait...

Posted Answers



Answer


Today I wanted to share some simple installation steps on installing Nexus Repository OSS on CentOS 7. Nexus Repository OSS is a free, open source artifact repository with universal format support provided by Sonatype. More information can be found here.

In my case I want to configure a Proxy Repository for Docker Container Images using Nexus Repository OSS. A Proxy Repository can be defined as follows:

I deployed a CentOS 7 Virtual Machine in my lab environment with the following specs:

The System Requirements for Nexus Repository OSS can be found here.

The following tools can be useful for troubleshooting your setup:

This will give you netstat for example.

This allows you to perform telnet commands on the VM.

2. Nexus Repository OSS requires Java 8 Runtime Environment. Check if you have Java installed, if not, make sure to install it:

3. We will be installing Nexus Repository OSS in a specific folder and create another folder for Data & Log files

4. Download the latest version of Nexus Repository OSS:

5. Extract it to our installation directory (/opt/nexus):

6. Create a Service Account called ‘nexus’ to run the Nexus Repository OSS Application under:

7. Set the necessary permissions on the Nexus folders for the nexus Service Account:

8. Configure the Environment Variables:

9. I changed the following options in the $NEXUS_HOME/bin/nexus.vmoptions config file to make sure we are using the correct folders where the nexus Service Account has permissions on:

10. Configure the run_as_user option in the Nexus Repository OSS Configuration file $NEXUS_HOME/bin/nexus.rc :

11. Create a SystemD Service File in /etc/systemd/system/nexus.service

12. (Optionally – if not using a SystemD Service file) You can increase / decrease the Open File limit in this file  /etc/security/limits.conf by adding the following line to it :

See Sonatype Support article here.

13. (Optionally – if using a SystemD Service file like in point 11) You can increase / decrease the Open File limit in this file  /etc/systemd/system/nexus.service by modifying the following line:

See Sonatype Support article here.

14. Enable & Start the Nexus Service:

15. Nexus Repository OSS is running on port 8081, to check if it’s listening on that port run the following command:

16. Now make sure that the firewall allows connections on port 8081:

17. Take your favourite Web Browser and browse to the following URL:

You should be greeted with the Welcome Page:

Enjoy!

For a later blogpost I’m thinking to set this up behind an NGINX Proxy and then afterwards make sure my Repository is used. Stay tuned!

Update Feb 2022: It did end up using Avi (NSX-Advanced Load Balancer) for my Reverse proxy requirements. See my blog article here.


Answer is posted for the following question.

How to install nexus in centos 7?

Answer


Permissive Temporary Duty (PTDY) : If you are retiring you may be authorized up to 20 days of Permissive TDY (See AR 600-8-10 for


Answer is posted for the following question.

How to get permissive tdy?


Wait...