Nexus is one of the most popular repository managers in the DevOps world. It allows you to store and retrieve build artifacts and also provides features to push and pull artifacts via CI and IDE integration tools such as Visual Studio and Jenkins.
Using Nexus as a repository, allows your developers to get and manage packages on the centralized repository manager, which also gives the developers team a single source of truth for every package.
In this video, we will explain how to install the Nexus Repository Manager on a Ubuntu 22.04 server. This tutorial also includes the installation of some packages such as Java OpenJDK and Nginx web server that will be used as a reverse proxy.
Useful Links:
VPS/VDS - https://www.mivocloud.com/
Nexus - https://www.sonatype.com/products/son...
Commands Used:
sudo apt install openjdk-8-jdk
java -version
sudo useradd -d /opt/nexus -s /bin/bash nexus
sudo passwd nexus
ulimit -n 65536
sudo nano /etc/security/limits.d/nexus.conf
nexus - nofile 65536
wget https://download.sonatype.com/nexus/3...
tar xzf nexus-3.41.1-01-unix.tar.gz
mv nexus-3.41.1-01 /opt/nexus
mv sonatype-work /opt/
chown -R nexus:nexus /opt/nexus /opt/sonatype-work
sudo nano /opt/nexus/bin/nexus.rc
run_as_user="nexus"
sudo nano /opt/nexus/bin/nexus.vmoptions
-Xms1024m
-Xmx1024m
-XX:MaxDirectMemorySize=1024m
sudo nano /etc/systemd/system/nexus.service
[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start nexus.service
sudo systemctl enable nexus.service
sudo systemctl status nexus.service
sudo apt install nginx -y
sudo systemctl is-enabled nginx
sudo systemctl status nginx
sudo nano /etc/nginx/sites-available/nexus
upstream nexus3 {
server 127.0.0.1:8081;
}
server {
listen 80;
server_name NAME;
location / {
proxy_pass http://nexus3/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
}
}
sudo ln -s /etc/nginx/sites-available/nexus /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
Watch video How to Install Nexus Repository Manager on Ubuntu 22.04 online without registration, duration hours minute second in high quality. This video was added by user MivoCloud 07 July 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,397 once and liked it 80 people.