What is a
Repository Manager
An repository manager allows to store and retrieve build artifacts. The
most popular examples for repository manager are Maven Central
Repository and jcenter
at Bintray, which you can use to retrieve your dependencies for a
Maven build.
What is
Nexus?
A Nexus installation brings you such a repository for your company. So
you can host your own repositories, but also use Nexus as a proxy for public
repositories. With such a proxy the time to receive an artifact is reduced and
it saves bandwidth.
Nexus allows you to host your private build artifacts. Nexus is available as
commercial and Open Source distribution.
Nexus
Repository Manager Installation on CentOS 7/8
In this
tutorial we will go through how to install and configure Sonatype Nexus
Repository manager in CentOS 7.
1) Login to your Linux server and update it.
sudo yum update -y
sudo yum install epel-release -y
sudo yum install java-1.8.0-openjdk -y
2) Create a directory named app and cd into the directory.
sudo mkdir /app && cd /app
3) Download the latest nexus. You can get the latest download links fo for nexus from
sudo wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz -O nexus.tar.gz
sudo tar -zxvf nexus.tar.gz
sudo ln -s nexus-* nexus
4) Create Nexus user and provide permissions to nexus home directory.
useradd nexus
chown -R nexus:nexus /app/nexus
5) Configure Nexus to run as Service in Linux machine.
sudo ln -s /app/nexus/bin/nexus /etc/init.d/nexus
sudo chown nexus:nexus /etc/init.d/nexus
sudo chkconfig --add nexus
sudo systemctl enable nexus
6) Start the nexus service.
sudo service nexus start
7) After few mins please access the Nexus Repository Manager at http://{hostname}:8081
Please add below line in Vagrantfile and restart your vm to access nexus UI on your browser.
jenkins_config.vm.network "forwarded_port", guest: 8081, host: 8081
8) In the recent versions of nexus we need to configure admin password during our first time login. Onetime password will be located in below location. we need to use this password to configure admin password.
Run below command to see the default password.
cat /app/sonatype-work/nexus3/admin.password
In Next tutorial we will discuss how to configure Nexus as Docker Trusted repository.
No comments:
Post a Comment