linux安装nexus(支持jdk1.7)

来源:互联网 发布:mysql查询出来乱码 编辑:程序博客网 时间:2024/06/07 06:04

版本:nexus-2.6.4-02-bundle
这个版本jdk需要1.7或以上
注:nexus 2.6版本之后不再支持jdk1.6
nexus 2.5.x nexus最后一个支持jdk1.6版本的

1创建安装目录

[root@xiniu maven]# mkdir -p /usr/java/nexus

2上传文件
这里写图片描述

3解压缩

[root@xiniu nexus]# lsnexus-2.6.4-02-bundle.zip[root@xiniu nexus]# unzip nexus-2.6.4-02-bundle.zip

4为了方便更新和切换版本,创建链接,更新或者切换版本只需更新链接即可:

[root@xiniu nexus]# ln -s nexus-2.6.4-02  nexus

5 修改配置文件

[root@xiniu bin]# cd /usr/java/nexus/nexus/conf [root@xiniu conf]# lsexamples  jetty.xml  logback.xml  nexus.properties[root@xiniu conf]# vi  nexus.properties修改内容 #Jetty section application-port=8081      ##修改Jetty端口号 # nexus section nexus-work=${bundleBasedir}/../sonatype-work/nexus  

6 配置用户

[root@xiniu conf]# vi /usr/java/nexus/nexus/bin/nexus使用/查询字符串 ,使用n查询下一个修改内容#RUN_AS_USER=RUN_AS_USER=root

这里写图片描述
7若有设置防火墙,需前往修改防火墙配置并重启防火墙
centos7.3关闭防火墙
关闭firewall:

systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)[root@xiniu ~]# systemctl stop firewalld.service[root@xiniu ~]# systemctl disable firewalld.serviceRemoved symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.[root@xiniu ~]# firewall-cmd --statenot running

8 启动nexus

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

9在浏览器打开:http://ip:8081/nexus,登录:用户名admin 默认密码:admin123
这里写图片描述

10
这里写图片描述
11
这里写图片描述
12这里写图片描述

原创粉丝点击