Nexus3

作者: 钾肥尔德 | 来源:发表于2020-03-06 15:54 被阅读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
  • 修改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

相关文章

网友评论

      本文标题:Nexus3

      本文链接:https://www.haomeiwen.com/subject/svnirhtx.html