阿里云搭建nexus

一 . 下载nexus 

[root@localhost nexus]# wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz

nexus-2.11.2-03 sonatype-work

(一个 nexus 服务,一个私有库目录)

第三步:编辑 Nexus 的 nexus.properties 文件,配置端口和 work 目录信息(保留默认)
[root@localhost nexus]# cd nexus-2.11.2-03
[root@localhost nexus-2.11.2-03]# ls
bin conf lib LICENSE.txt logs nexus NOTICE.txt tmp
查看目录结构,jetty 运行
[root@localhost nexus-2.11.2-03]# cd conf
[root@localhost conf]# vi nexus.properties

1
2
3
4
5
6
7
8
# 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

 如下图


第四步:编辑 nexus 脚本, 配置 RUN_AS_USER 参数
[root@localhost conf]# vi /usr/nexus/nexus-2.11.2-03/bin/nexus

NEXUS_HOME=".."
改为(不修改默认也可以):
NEXUS_HOME="nexus安装目录"

#RUN_AS_USER=
改为:
RUN_AS_USER=root


扫描二维码关注公众号,回复: 3229516 查看本文章

第五步:防火墙中打开 8081 端口 [etc目录通常放一些零散的配置文件]

关闭防火墙 service iptables stop

开启防火墙 service iptables start

添加规则时候 去/etc/sysconfig/iptables中修改下开放规则顺序 别放到最后

启动nexus ./nexus start

猜你喜欢

转载自blog.csdn.net/liyanpeng1989/article/details/79771867