美文网首页
Nexus私服搭建

Nexus私服搭建

作者: adeng2016 | 来源:发表于2017-02-04 10:18 被阅读75次

下载

官网下载 Nexus Repository OSS 社区版,笔者是在CentOS 7.2环境下安装的。

安装

解压即可

$ cd /data
$ tar xvzf nexus-3.2.0-01-unix.tar.gz

配置环境变量

编辑.bash_profile

$ vi ~/.bash_profile

添加如下内容

export NEXUS_HOME=/data/nexus-3.2.0-01
export PATH=$PATH:$NEXUS_HOME/bin
$ source ~/.bash_profile

配置自动运行 systemd

编辑文件

$ vi /etc/systemd/system/nexus.service

添加如下内容

[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
ExecStart=/data/nexus-3.2.0-01/bin/nexus start
ExecStop=/data/nexus-3.2.0-01/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target

启动

$ systemctl daemon-reload
$ systemctl enable nexus.service
$ systemctl start nexus.service

执行tail查看日志

$ tail -f /data/nexus-3.2.0-01/sonatype-work/nexus3/log/nexus.log

看到如下字样,表示启动成功

-------------------------------------------------

Started Sonatype Nexus OSS 3.2.0-01

-------------------------------------------------

访问

默认8081端口

Paste_Image.png

登录

用admin登录(默认密码admin123)后出现配置图标:

Paste_Image.png

修改管理员密码,打完收工。

相关文章

网友评论

      本文标题:Nexus私服搭建

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