centos7搭建nexus maven私服

1.首先安装JDK
2.官网下载:https://www.sonatype.com/download-oss-sonatype
上传到 /usr/local下
解压 tar -zxvf nexus-3.5.0-02-unix.tar.gz
启动: cd nexus-3.5.0/bin
./nexus run & &符号表示后台启动
当最后出现 Started Sonatype Nexus OSS 3.5.0-02 表示启动成功
3.需要打开另外一个终端,开放端口
firewall-cmd –zone=public –add-port=8081/tcp –permanent
firewall-cmd –reload
4.访问: http://ip:8081
默认账号和密码:admin admin123
5操作:
./nexus start ./nexus stop
6.nexus3.X的优化配置(可选):
1.把nexus3.1加入到系统服务,使之能够开机自启动:
[root@localhost bin]# ln -s /usr/local/nexus-3.5.0-02/bin/nexus /etc/init.d/nexus3
[root@localhost bin]# chkconfig –add nexus3
[root@localhost bin]# chkconfig nexus3 on
2.修改运行nexus3所使用的用户
[root@localhost bin]# vi nexus.rc
run_as_user=”root”
3.修改nexus3启动时要使用的jdk版本:
[root@localhost bin]# vi bin/nexus
INSTALL4J_JAVA_HOME_OVERRIDE=/usr/local/java/jdk1.8.0_121
4.修改nexus3默认端口:
[root@localhost etc]# vi nexus-default.properties
application-port=8282
5.修改nexus3数据以及相关日志的存储位置:
[root@localhost bin]# vi nexus.vmoptions
-XX:LogFile=./sonatype-work/nexus3/log/jvm.log
-Dkaraf.data=./sonatype-work/nexus3
-Djava.io.tmpdir=./sonatype-work/nexus3/tmp
6.现在我们可以启动nexus3使用如下命令:
[root@localhost bin]# /etc/init.d/nexus3 start

参考:http://blog.csdn.net/yougoule/article/details/56843562

你可能感兴趣的:(linux)