也可以参考http://www.tuicool.com/articles/E7ZBv2
*环境要求:
jdk_7u2+
下载nexus https://www.sonatype.com/download-oss-sonatype
建议安装到/usr/local/这个目录下。
tar zxvf nexus-2.14.2-01-bundle.tar.gz
或者unzip nexus-2.14.2-01-bundle.zip
设置软链接
ln -s nexus-2.14.2-01 nexus
解压以后生成两个目录:
nexus-2.14.2-01 sonatype-work
后者包含了所有的仓库和配置数据,可以在配置文件conf/nexus.properties里修改nexus-work属性来改变sonatype-work的位置。
./bin/nexus console
命令可以启动私服,同时在当前窗口中输出日志,
也可以使用
./bin/nexus start
命令启动
tail -f logs/wrapper.log
查看日志
*注意启动日志中有没有报异常
./bin/nexus status
查看启动状态
成功启动后,访问 http://yourhost:8081/nexus,默认用户名/密码,admin/admin123
如果正常启动了但是访问不了,检查防火墙/etc/init.d/iptables status
,使用chkconfig iptables off
关闭防火墙,重启系统后生效。
./bin/nexus stop
关闭nexus
./bin/nexus restart
重启nexus