银河麒麟服务器v10 sp2安装nexus2.14.3

1. 下载nexus安装包
wget "https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.3-02-bundle.tar.gz"

2. 解压安装包:
tar -xfvz nexus-2.14.3-02-bundle.tar.gz
mv nexus-2.14.3-02 /usr/local
解压之后就会看到两个目录:
nexus-2.14.3-02:里面是nexus的运行环境和应用程序。
sonatype-work:里面是我们后面要对nexus进行一些配置的地方,像索引和起始的仓库和端口等都可以在这里面配置。

3. 添加环境变量vim /etc/profile,添加如下两行
export RUN_AS_USER=root
export PATH=.:$JAVA_HOME/bin:$RUN_AS_USER:$PATH

4. 更新环境变量,使其立即生效
source /etc/profile

5.查看配置文件nexus.properties
cat /usr/local/nexus-2.14.3-02/conf/nexus.properties

# Jetty section
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus

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

# orientdb buffer size in megabytes
storage.diskCache.bufferSize=4096

6. 修改nexus启动用户为root
vim /usr/local/nexus/nexus-2.14.3-02/bin/nexus
修改内容:RUN_AS_USER=root

7. 启动nexus:
/usr/local/nexus-2.14.3-02/bin/nexus start

[root@localhost bin]# ./nexus start
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
Starting Nexus OSS...
Started Nexus OSS.

8.安装成功后,在浏览器访问:
http://192.168.174.132:8081/nexus
默认账户和密码: admin/admin123

其他基本命令:
 /usr/local/nexus-2.14.3-02/bin/nexus start 启动
 /usr/local/nexus-2.14.3-02/bin/nexus stop 停止
 /usr/local/nexus-2.14.3-02/bin/nexus restart 重启
 /usr/local/nexus-2.14.3-02/bin/nexus status 查看状态

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值