Skip to content

amirajoodani/nexus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

nexus installation

firest update repository :
debian : (# sudo apt-get update)
redhat : (# sudo yum update)

install java :

sudo apt install openjdk-8-jre-headless

sudo yum install java-1.8.0-openjdk-headless

Download latest version of nexus

cd /opt
sudo wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz
sudo tar -zxvf latest-unix.tar.gz
rename folder :
sudo mv nexus-3.x.x.x/ /opt/nexus
add user with nexus name and set sudo access to it an NOPASSWD :
sudo adduser nexus
sudo vi /etc/sudoers
under root part : (User prilvilage spcification or Allow root to run any commands anywhere ) add this part :
nexus ALL=(ALL)NOPASSWD:ALL (save and exit )
give access to folders and file :
sudo chown -R nexus:nexus /opt/nexus
sudo chown -R nexus:nexus /opt/sonatype-work

To run nexus as service at boot time

open /opt/nexus/bin/nexus.rc file T uncomment it and nexus user as shown below :
sudo vi /opt/nexus/bin/nexus.rc
change as below :
run_as_user="nexus"

for increase the nexus JVM Heap Size :

sudo /opt/nexus/bin/nexus.vmoptions
-xms 2703 --> 1024

to run nexus as systemd service we should create unit file :

sudo vi /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
TimeoutSec=600

[Install] WantedBy=multi-user.target

start and Enable service

sudo systemctl start nexus
sudo systemctl status nexus
sudo systemctl enable nexus

open port 8081 for web access

(ufw) sudo ufw allow 8081/tcp
(firewalld) sudo firewall-cmd --add-port=8081/tcp

web user and password

cat /opt/sonatype-work/nexus3/admin.password
(user will be admin and password will show in admin.password)

About

nexus installation docs and Usefull resource

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published