Nexus installation
What is nexus?
--> Nexus is artifact manager, artifact is nothing but when code is build it generates an artifact which can be deployed on targets.
Nexus is a repository manager. It allows you to proxy, collect, and manage your dependencies so that you are not constantly juggling
a collection of JARs. It makes it easy to distribute your software. Internally, you configure your build to publish artifacts to Nexus
and they then become available to other developers. You get the benefits of having your own 'central', and there is no easier way to collaborate.
Latest nexus installation GUIDE LINK - https://github.com/ValaxyTech/DevOpsDemos/blob/master/Nexus/Nexus_Installation.MD
Latest version of Sonatype Nexus needs Java 8 version
add-apt-repository ppa:openjdk-r/ppa
apt-get update
apt-get install openjdk-8-jdk
java -version
cd /usr/local
- Download http://download.sonatype.com/nexus/3/nexus-3.6.0-02-unix.tar.gz (OR https://help.sonatype.com/repomanager3/download/download-archives---repository-manager-3)
wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
tar -xvzf nexus-latest-bundle.tar.gz
mv nexus-2.14.13-01 nexus
useradd nexus
sh –c ‘echo “export NEXUS_HOME=/usr/local/nexus” >> /etc/profile.d/nexus.sh’
cp /usr/local/nexus/bin/nexus /etc/init.d/nexus
chmod 755 /etc/init.d/nexus
chown root /etc/init.d/nexus
update-rc.d nexus defaults
create a directory for Sonatype products to use for working files
mkdir /etc/local/sonatype-work
create a directory for Nexus to use for working files
mkdir /etc/local/sonatype-work/nexus
make the nexus user created above the owner of this directory
chown –R nexus:nexus /etc/local/sonatype-work
edit this file to point to the directory and user created above.
vi /etc/init.d/nexus
NEXUS_HOME=”/usr/local/nexus”
RUN_AS_USER=”nexus”
/var/lib/dpkg/info/ca-certificates-java.postinst configure
su - nexus
$ service nexus start