美文网首页
Centos7搭建Nexus

Centos7搭建Nexus

作者: tianwen01 | 来源:发表于2018-09-17 20:13 被阅读0次

安装

useradd -s  /sbin/nologin nexus;\
wget -cP /tmp/ https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/3/nexus-3.13.0-01-unix.tar.gz;\
mkdir /opt/nexus;\
tar xf /tmp/nexus-3.13.0-01-unix.tar.gz -C /opt/nexus/;\
chown -R nexus. /opt/nexus

添加系统服务

tee /etc/systemd/system/nexus.service << 'EOF'
[Unit]
Description=nexus service
After=network.target

[Service]
Environment="JAVA_HOME=/usr/java/jdk1.8.0_181-amd64"
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/nexus-3.13.0-01/bin/nexus start
ExecStop=/opt/nexus/nexus-3.13.0-01/bin/nexus stop
User=nexus
Restart=on-abort

[Install]
WantedBy=multi-user.target
EOF

启动

systemctl daemon-reload;\
systemctl enable nexus;\
systemctl start nexus;\
systemctl status nexus

防火墙

firewall-cmd --add-port=8081/tcp --permanent;\
firewall-cmd --reload

默认账号

admin/admin123

Maven私库

https://help.sonatype.com/learning/repository-manager-3/proxying-maven-and-npm-quick-start-guide#ProxyingMavenandNPMQuickStartGuide-Maven

NPM私库

https://help.sonatype.com/repomanager3/node-packaged-modules-and-npm-registries

相关文章

网友评论

      本文标题:Centos7搭建Nexus

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