1.安装jdk环境:
yum install java-1.8.0-openjdk-devel java-1.8.0-openjdk java-1.8.0-openjdk-headless -y
vim /etc/profile
#JAVA
export JAVA_HOME=/usr/lib/jvm/java
export JRE_HOME=
J
A
V
A
H
O
M
E
/
j
r
e
e
x
p
o
r
t
C
L
A
S
S
P
A
T
H
=
.
:
{JAVA_HOME}/jre export CLASSPATH=.:
JAVAHOME/jreexportCLASSPATH=.:JRE_HOME/lib/rt.jar:
J
A
V
A
H
O
M
E
/
l
i
b
/
d
t
.
j
a
r
:
JAVA_HOME/lib/dt.jar:
JAVAHOME/lib/dt.jar:JAVA_HOME/lib/tools.jar
export PATH=
J
A
V
A
H
O
M
E
/
b
i
n
:
JAVA_HOME/bin:
JAVAHOME/bin:PATH
source /etc/profile
wget https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/3/nexus-3.16.1-02-unix.tar.gz
mkdir /usr/local/nexus/
tar xf nexus-3.16.1-02-unix.tar.gz -C /usr/local/nexus/
useradd guan
vim /usr/local/nexus/nexus-3.16.1-02/bin/nexus.rc
run_as_user=“guan”
/usr/local/nexus/nexus-3.16.1-02/bin/nexus run &
ps -ef|grep nexus
setenforce 0
iptables -F
浏览器输入:http://192.168.1.250:8081/
登录:用户名:admin 密码:admin123