从零开始搭建系统2.1——Nexus安装及配置
在安装配置Nexus时,请先确定您已经配置好jdk
1.创建目录

2.下载安装包
[root@localhost usr]# cd nexus
下载地址:https://www.sonatype.com/download-oss-sonatype
wget https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/3/nexus-3.9.0-01-unix.tar.gz
3.解压安装包
tar -zxvf nexus-3.9.0-01-unix.tar.gz
解压之后生成两个文件夹,分别为nexus-2.3.1-01、sonatype-work

4.启动
进入到bin目录下,执行./nexus start

解决上面的提示:
创建nexus用户
groupadd nexus#创建组
useradd nexus -g nexus#创建用户并将用户添加到组
#修改文件所有者
chown -R nexus /usr/nexus/
修改 nexus 脚本,指定启动用户

5.开启8081端口
添加
5.验证是否启动成功
http://192.168.0.200:8081

出现上述页面,说明配置nexus成功!
点击右上角“Log in”, 输入用户名和密码(默认用户名:admin 密码: admin123)登录。
sudo ln -s /usr/nexus/nexus-3.9.0-01/bin/nexus /etc/init.d/nexus
使用
service nexus status/start/stop
查看nexus服务状态、启动服务、停止服务等
使用
chkconfig nexus on/off
设置nexus服务开机自启动或者开机不启动
如果启动不起来的话可以用下面方式启动,通过启动日志查找问题
service nexus start-launchd
7.配置nexus
新建store

8.proxy私仓,使用的外部私仓是阿里的仓库http://maven.aliyun.com/nexus/content/groups/public:

9.release私仓

10.snapshot私仓

11.group私仓组


12.如何在项目中使用
settings.xml 配置
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:\.m2\repository</localRepository>
<pluginGroups>
<pluginGroup>org.sonatype.plugins</pluginGroup>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>Releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>Snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.0.200:8081/repository/nexus-public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
项目pom配置

<distributionManagement>
<repository>
<id>Releases</id>
<name>Releases</name>
<url>http://192.168.0.200:8081/repository/nexus-releases</url>
</repository>
<snapshotRepository>
<id>Snapshots</id>
<name>Snapshots</name>
<url>http://192.168.0.200:8081/repository/nexus-snapshots</url>
</snapshotRepository>
</distributionManagement>
13.直接deploy即可

14.设置可重复deploy
如果需要可重复deploy同一个版本的jar包,可进行如下配置

从零开始搭建系统2.1——Nexus安装及配置的更多相关文章
- 从零开始搭建系统2.8——HDFS安装及配置
从零开始搭建系统2.8——HDFS安装及配置
- 从零开始搭建系统2.4——Jenkins安装及配置
1.安装wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.reporpm --impo ...
- 从零开始搭建系统2.2——ELK安装及配置
ELK 最新版本对JDK的最低要求是1.8,安装java_1.8版本 一.Elasticsearch 1.创建目录 2.下载安装包 wget https://artifacts.elastic.co/ ...
- 从零开始搭建系统1.7——FTP安装及配置
1.安装vsftp软件包 [root@localhost usr]# yum install -y vsftpd 2.先备份vsftpd的默认配置文件 [root@localhost usr]# cd ...
- 从零开始搭建系统1.3——Tomcat安装及配置
首先安装jdk,手动解压JDK的压缩包,然后设置环境变量 1.卸载自带openjdk 查询OpenJDK rpm -qa|grep java 批量卸载所有名字包含jdk的已安装程序.命令行: rpm ...
- 从零开始搭建系统1.2——Nginx安装及配置
一.安装准备 首先由于nginx的一些模块依赖一些lib库,所以在安装nginx之前,必须先安装这些lib库,这些依赖库主要有g++.gcc.openssl-devel.pcre-devel和zlib ...
- 从零开始搭建系统2.5——Apollo安装及配置
参见https://github.com/ctripcorp/apollo/wiki/Quick-Start安装即可
- 从零开始搭建系统1.4——MySql安装及配置
安装环境:CentOS7 64位 ,安装MySQL5.7 1.创建mysql目录 2.在MySQL官网中下载YUM源rpm安装包:http://dev.mysql.com/downloads/repo ...
- 从零开始搭建系统1.5——Redis安装及配置
1.在/usr/目录下创建redis目录 [root@localhost usr]# mkdir redis 2.下载安装包 wget http://download.redis.io/release ...
随机推荐
- 递归,装饰器,python常用内置方法
**递归** def calc(n): print(n) if int(n / 2) == 0: 条件判断 r ...
- 使用Hystrix实现断路器处理
在之前的架构的基础上我们会发现,一旦级别低的服务宕了,会导致调用它的服务也挂掉,这样容易产生级联效应(雪崩效应),为了防止这种情况的出现,我引入了Hystrix来处理,先介绍ribbon使用Hystr ...
- AtCoder ABC 131F Must Be Rectangular!
题目链接:https://atcoder.jp/contests/abc131/tasks/abc131_f 转自博客:https://blog.csdn.net/qq_37656398/articl ...
- printf sscanf进阶
printf ; printf (3d", a);//将打印 035 printf(“%-*s”, width, string): “*”: 在这里用width代替,其实和printf(“% ...
- mybatis xml中大于号小于号的代替
第一种写法(1): 原符号 < <= > >= & ' "替换符号 < <= > >= & ' " ...
- 阿里云物联网边缘计算加载MQTT驱动
写在前面 本文在LinkEdge快速入门样例驱动的基础上,加载了MQTT订阅的客户端,使得边缘端容器可以通过MQTT获得外部数据. 1. 系统需求 物联网边缘计算平台,又名Link IoT Edge[ ...
- 破解极验(geetest)验证码
破解极验(geetest)验证码 这是两年前的帖子: http://www.v2ex.com/t/138479 一个月前的破解程序,我没用过 asp.net ,不知道是不是真的破解了, demo ...
- Java-Class-I:org.springframework.web.mutipart.MutipartFile
ylbtech-Java-Class-I:org.springframework.web.mutipart.MutipartFile 1.返回顶部 2.返回顶部 1.1. import org.s ...
- 17、通过maven生成测试报告
目录如下: 通过Maven 生成报告 进入testngTest根目录,运行mvn test 命令 进入 testngTest\target\surefire-reports 路径查看测试报告
- 剑指offer——73股票的最大利润
题目: 假设把某股票的价格按照时间先后顺序存储在数组中,请问买卖该股票一次可能获得的最大利润是多少?例如,一只股票在某些时间节点的价格为{9,11,8,5,7,12,16,14}.如果我们能在价格为5 ...