您的位置:首页 > 运维架构 > Linux

使用nexus在linux部署私有仓库

2016-05-14 20:09 281 查看
今天花时间在虚拟机里用nexus布置了一个私有仓库,下面是我操作的一些步骤,记录一下。

这是下载nexus的官网地址http://www.sonatype.com/download-oss-sonatype

 虚拟机的linux系统已经装好,我是在本机上下载的安装包nexus-2.13.0-01-bundle.tar.gz,可以使用WinSCP上传,也可以安装vm-tools,直接拖进去

解压缩tar -cxvf  nexus-2.13.0-01-bundle.tar.gz
在bin目录运行./nexus start 出现以下提示****************************************
WARNING – NOT RECOMMENDED TO RUN AS ROOT
****************************************
If you insist running as root, then set the environment variable RUN_AS_USER=root before running this script.                                                     
         输入vi /etc/profile 加入export RUN_AS_USER=root 保存修改 再执行source /etc/profile 再执行./nexus start 启动成功

nexus默认端口号是8081,是在conf下的nexus.properties文件中配置的
登录http://localhost:8081/nexus/就能看到,默认账号admin密码admin123

在linux下已经开启nexus,但是局域网访问不到,后来在网上找到原因,防火墙没有开放8081端口,这就需要手动去开启端口了,命令提供如下

/sbin/iptables -I INPUT -p tcp --dport 8081 -j ACCEPT #开启8081端口

/etc/rc.d/init.d/iptables save #保存配置

/etc/rc.d/init.d/iptables restart #重启服务

再次访问http://localhost:8081/nexus/就ok了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux nexus