环境
系统:CentOS 7.5
软件:nexus-3.11.0-01-unix.tar.gz
准备
安装
-
安装
# tar -xzvf nexus-3.11.0-01-unix.tar.gz # mv nexus-3.11.0-01 /usr/local/nexus # mv sonatype-work /usr/local/
-
创建用户
# useradd nexus # chown -R nexus:nexus /usr/local/sonatype-work /usr/local/nexus
-
配置启动用户
# vim /usr/local/nexus/bin/nexus.rc run_as_user="nexus"
-
配置环境变量
# vim /etc/profile export NEXUS_HOME=/usr/local/nexus export PATH=$NEXUS_HOME/bin:$PATH # source /etc/profile
启动
-
添加启动服务
# vim /usr/lib/systemd/system/nexus.service [Unit] Description=nexus service After=network.target [Service] Type=forking LimitNOFILE=65536 ExecStart=/usr/local/nexus/bin/nexus start ExecStop=/usr/local/nexus/bin/nexus stop User=nexus Restart=on-abort [Install] WantedBy=multi-user.target
-
启动
# systemctl enable nexus.service # systemctl start nexus.service
其它
- Web打开
http://ip:8081
默认账号密码:admin
,admin123