centos7安装nexus-2.12.0-01

准备条件

环境必须安装了jdk且设置了环境变量。

1.登录root用户创建nexus用户

[root@localhost ~]# useradd nexus
[root@localhost ~]# passwd nexus
更改用户 nexus 的密码 。
新的 密码:
无效的密码: 密码少于 8 个字符
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
[root@localhost ~]# 

2.登录nexus用户安装

上传安装包:

nexus-2.12.0-01-bundle.zip

解压安装包:

unzip nexus-2.12.0-01-bundle.zip

创建软连接:

ln -s nexus-2.12.0-01 nexus 

3.配置

编辑nexus文件,修改NEXUS_HOME为自己的安装地址,修改运行使用用户名称

# Set this to the root of the Nexus installation
#NEXUS_HOME=".."
NEXUS_HOME="/home/nexus/nexus-2.12.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=nexus
# Application
APP_NAME="nexus"
APP_LONG_NAME="Nexus OSS"

在conf目录下nexus.properties文件中修改nexus对外端口以及对外主机地址

# Jetty section
application-port=9001
application-host=192.168.1.187
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus
application-port-ssl=8443

# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF

修改文件 /bin/nexus,增加如下代码

RUN_AS_USER=nexus

启动nexus

bin/nexus start

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

刀不封

打赏就是对作者的一种赞赏和鼓励

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值