linux(centos)安装Nexus

1、解压nexus压缩包

tar xvzf ./nexus-2.13.0-01-bundle.tar.gz

2、修改配置文件:

  修改jetty配置

[root@localhost nexus]# vim nexus-2.13.0-01/bin/nexus

# Set this to the root of the Nexus installation

#NEXUS_HOME=".."                                  #将这行注释掉,修改为下边的,

NEXUS_HOME="/home/nexus/nexus-2.13.0-01"

# If specified, the Wrapper will be run as the specified user.

# IMPORTANT - Make sure that the user has the required privileges to write into the Nexus installation directory.

# NOTE - This will set the user which is used to run the Wrapper as well as

#  the JVM and is not useful in situations where a privileged resource or

#  port needs to be allocated prior to the user being changed.

#RUN_AS_USER=

RUN_AS_USER=root                          #添加这行

# Application

APP_NAME="nexus"

APP_LONG_NAME="Nexus OSS"

3、将nexus设置为开机启动

[root@localhost nexus]# cd nexus-2.13.0-01/bin

[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

4、开放端口8081

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT

重启端口服务

service iptables restart

原文地址:https://www.cnblogs.com/wangkeai/p/5787770.html