1. Introduction
This post shows how to install Nexus on Ubuntu 16.04
2. Step by Step
2.1. Download install binary
$ cd /tmp$ wget http://download.sonatype.com/nexus/3/nexus-3.6.0-02-unix.tar.gz
2.2. Install Nexus on /opt/nexus
$ tar -xvzf nexus-3.6.0-02-unix.tar.gz
$ sudo mv /tmp/nexus-3.6.0-02 /opt
$ sudo mv /opt/nexus-3.6.0-02 /opt/nexus
2.3. Configure Nexus
a) Configure Nexus Port
$ sudo cp /opt/nexus/etc/nexus-default.properties /opt/nexus/etc/nexus-default.properties.bkp.2017-11-05 # take a backup
$ sudo vim /opt/nexus/etc/nexus-default.properties
:
application-port=8081
:
:
application-port=8081
:
b) Add firewall rule to accept incomming call on nexus port 8081
$ sudo ufw allow 8081c) Configure Nexus script - run_as_user
$ sudo cp /opt/nexus/bin/nexus /opt/nexus/bin/nexus.bkp.2017-11-05 # backup$ sudo vim /opt/nexus/bin/nexus
:
# user to execute as; optional but recommended to set
run_as_user='nexus'
NEXUS_HOME="/opt/nexus"
:
d) Configure nexus users and group
$ sudo adduser --no-create-home --disabled-login --disabled-password nexusAdding user `nexus' ...
Adding new group `nexus' (1002) ...
Adding new user `nexus' (1002) with group `nexus' ...
Not creating home directory `/home/nexus'.
Changing the user information for nexus
:
Is the information correct? [Y/n] Y
e) Set files permission '/opt/nexus'
$ sudo chown -R nexus:nexus /opt/nexus2.4. Deploying nexus and sonatype-work directories
$ sudo mkdir /var/lib/nexus
$ sudo mkdir /var/lib/nexus/sonatype-work
$ sudo chown -R nexus:nexus /var/lib/nexus
2.5. Run Nexus and check
$ su - nexus$ whoami
nexus
$ /opt/nexus/bin/nexus start
Nenhum comentário:
Postar um comentário