CentOS 7.2安装Nexus私服2.13.0-01

1.mkdir /usr/local/nexus,cd /usr/local/nexus

2.wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.13.0-01-bundle.tar.gz下载安装包 

3.tar -zxvf nexus-2.13.0-01-bundle.tar.gz 解压文件,并进入文件夹

4.进到bin目录 vi nexus,加上一句 NEXUS_HOME="/home/nexus/nexus-2.13.0-01" 修改Jetty的配置。

再增加运行权限 RUN_AS_USER=root 保存退出

5.设置开机启动

[root@localhost bin]# cp ./nexus /etc/rc.d/init.d/

[root@localhost bin]# cd /etc/rc.d/init.d/

[root@localhost init.d]# chkconfig --add nexus

[root@localhost init.d]# chkconfig --list | grep nexus

nexus           0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@localhost init.d]# chkconfig nexus on

[root@localhost init.d]# chkconfig --list | grep nexus

nexus           0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@localhost init.d]#

6.启动Nexus

[root@localhost init.d]# cd /usr/local/nexus/nexus-2.13.0-01/bin/

[root@localhost bin]# ./nexus start#启动nexus

****************************************

WARNING - NOT RECOMMENDED TO RUN AS ROOT

****************************************

Starting Nexus OSS...

Started Nexus OSS.

7.增加防火墙端口开放

[root@Florentino init.d]# firewall-cmd --zone=public --add-port=8081/tcp --permanent

success

[root@Florentino init.d]# firewall-cmd --reload

success

收工!

你可能感兴趣的:(CentOS 7.2安装Nexus私服2.13.0-01)