Giter Site home page Giter Site logo

nexus-installation's Introduction

Nexus-Installation

Pre-requisite:

Create Redhat EC2 t2.medium Instance with 4GB RAM.
Create Security Group and open Required ports.
8081
Attach Security Group to EC2 Instance.
Install java openJDK 1.8+ for Nexus version 3.15
* Create nexus user to manage the Nexus server.
#As a good security practice, it is not advised 
#to run nexus service as a root user.
* so create a new user called nexus and grant sudo access to manage nexus services as follows,
sudo hostnamectl set-hostname nexus
sudo useradd nexus
## Grand sudo access to nexus user
sudo echo "nexus ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/nexus 
sudo su - nexus
## Install Java as a pre-requisit for nexus and other softwares
cd /opt
sudo yum install wget git nano unzip -y
sudo yum install java-11-openjdk-devel java-1.8.0-openjdk-devel -y
## Download nexus software and extract it (unzip).
sudo wget http://download.sonatype.com/nexus/3/nexus-3.15.2-01-unix.tar.gz 
sudo tar -zxvf nexus-3.15.2-01-unix.tar.gz
sudo mv /opt/nexus-3.15.2-01 /opt/nexus
sudo rm -rf nexus-3.15.2-01-unix.tar.gz
## Grant permissions for nexus user to start and manage nexus service
# Change the owner and group permissions to /opt/nexus and /opt/sonatype-work directories.
sudo chown -R nexus:nexus /opt/nexus
sudo chown -R nexus:nexus /opt/sonatype-work
sudo chmod -R 775 /opt/nexus
sudo chmod -R 775 /opt/sonatype-work
vi /opt/nexus/bin/nexus.rc file and uncomment 
run_as_user parameter and set as nexus user.
# change from #run_as_user="" to [ run_as_user="nexus" ]
echo  'run_as_user="nexus" ' > /opt/nexus/bin/nexus.rc

## CONFIGURE NEXUS TO RUN AS A SERVICE:
sudo ln -s /opt/nexus/bin/nexus /etc/init.d/nexus
#9 Enable and start the nexus services
sudo systemctl enable nexus
sudo systemctl start nexus
sudo systemctl status nexus
echo "end of nexus installation"

nexus-installation's People

Contributors

ayafor-code avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.