Detailed instructions for installing CentOS7 Nexus

  • 2020-05-27 07:46:02
  • OfStack

CentOS7 Nexus installation

CentOS7

Download

Nexus installation download nexus-2.11.2-03-bundle.tar.gz

Install

The installation

Upload the RPM file to the /tmp directory


mkdir /opt/nexus
cd /opt/nexus
tar -zxvf /tmp/nexus-2.11.2-03-bundle.tar.gz
ln -sf /opt/nexus/nexus-2.11.2-03/opt/nexus/latest
ln -sf /opt/nexus/latest /opt/nexus/default

A new user


useradd -r nexus --shell /bin/false
chown -hR nexus:/opt/nexus

Powered up

New/etc init d/nexus


#!/bin/sh

# chkconfig: - 80 20
# Description: Nexus OSS

NEXUS_HOME=/opt/nexus/default
RUN_AS_USER=nexus
JAVA_HOME=/usr/java/default

export NEXUS_HOME RUN_AS_USER JAVA_HOME

"$NEXUS_HOME/bin/nexus"\
$1
exit $?

Grant execution rights

chmod +x /etc/init.d/nexus

set

/opt/nexus/default/conf/nexus.properties

application-port=9083
nexus-webapp-context-path=/

Set to boot

chkconfig nexus on

A firewall

New file/usr/lib/firewalld/services/jenkins xml


<?xml version="1.0" encoding="utf-8"?>
<service>
    <short>Nexus</short>
    <description>Nexus OSS</description>
    <portprotocol="tcp"port="9083"/>
</service>

Modify firewall Settings

firewall-cmd --permanent --add-service=nexus
firewall-cmd --reload

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: