Skip to content

Files

Latest commit

 

History

History
65 lines (49 loc) · 1.73 KB

Nexus_Installation.MD

File metadata and controls

65 lines (49 loc) · 1.73 KB

Nexus Installation

Nexus is one a artifact repository which helps to store your build outcomes.

Follow this article in **Youtube

Prerequisites

  1. EC2 instance with java

Implementation steps

Download and setup nexus stable version

cd /opt
wget https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-3.0.2-02-unix.tar.gz
tar -zxvf  nexus-3.0.2-02-unix.tar.gz
mv /opt/nexus-3.0.2-02 /opt/nexus

As a good security practice, it is not advised to run nexus service as root. so create new user called nexus and grant sudo access to manage nexus services

sudo adduser nexus
# visudo \\ nexus   ALL=(ALL)       NOPASSWD: ALL
sudo chown -R nexus:nexus /opt/nexus

Open /opt/nexus/bin/nexus.rc file, uncomment run_as_user parameter and set it as following.

vi /opt/nexus/bin/nexus.rc
run_as_user="nexus" (file shold have only this line)

Add nexus as a service at boot time

sudo ln -s /opt/nexus/bin/nexus /etc/init.d/nexus

Login as a nexus user and start service

su - nexus
service nexus start

Login nexus server from browser on port 8081

http://<Nexus_server>:8081

Use default credentials to login

username : admin
password : admin123

Troubleshooting

service is not starting?

  • make sure you are trying to start service with nexus user.
  • check java installation

Unable to access nexus URL?

  • make sure port 8081 is opened in security group.

Next Steps