Nexus3

2020-03-06  本文已影响0人  钾肥尔德

下载

wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz
# 应该是被墙了的

部署

yum install -y java-1.8.0-openjdk

mkdir /opt
tar xvf latest-unix.tar.gz -C /opt
mv /opt/lastest-unix /opt/nexus  # nexus执行文件目录
useradd --system --comment 'nexus' --user-group nexus
chown -R nexus:nexus /opt/nexus
chown -R nexus:nexus /opt/sonatype-work

开机自启

cat > /etc/systemd/system/nexus.service <<EOF
[Unit]
Description=nexus service
After=network.target
  
[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Restart=on-abort
  
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable nexus
systemctl start nexus

访问

http://host-IP:8081

上一篇下一篇

猜你喜欢

热点阅读