当前位置:网站首页>Repository Manager之Nexus
Repository Manager之Nexus
2022-06-11 14:18:00 【华为云】
私服是指私有服务器,是架设在局域网的一种特殊的远程仓库,目的是代理远程仓库及部署第三方构建。有了私服之后,当 Maven 需要下载构件时,直接请求私服,私服上存在则下载到本地仓库;否则,私服请求外部的远程仓库,将构件下载到私服,再提供给本地仓库下载
Nexus 是Maven仓库管理器,如果你使用Maven,你可以从Maven中央仓库 下载所需要的构件(artifact),但这通常不是一个好的做法,你应该在本地架设一个Maven仓库服务器,在代理远程仓库的同时维护本地仓库,以节省带宽和时间,Nexus就可以满足这样的需要。此外,他还提供了强大的仓库管理功能,构件搜索功能,它基于REST,友好的UI是一个extjs的REST客户端,它占用较少的内存,基于简单文件系统而非数据库。这些优点使其日趋成为最流行的Maven仓库管理器

部署
yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-develcd /optwget https://download.sonatype.com/nexus/3/nexus-3.39.0-01-unix.tar.gztar -zxvf https://download.sonatype.com/nexus/3/nexus-3.39.0-01-unix.tar.gzmv nexus-3.39.0-01 nexusmv sonatype-work nexusdata部署为服务,编辑/etc/systemd/system/nexus.service
[Unit]Description=nexus serviceAfter=network.target [Service]Type=forkingLimitNOFILE=65536ExecStart=/opt/nexus/bin/nexus startExecStop=/opt/nexus/bin/nexus stopUser=nexusRestart=on-abortTimeoutSec=600 [Install]WantedBy=multi-user.target添加用户
useradd --system --no-create-home nexuschown nexus:nexus nexus-3.39.0-01 -R编辑rc文件 /opt/nexus/bin/nexus.rc
cat nexus.rc编辑vmoption文件:vim /opt/nexus/bin/nexus.vmoptions
-Xms1200m-Xmx1200m-XX:MaxDirectMemorySize=1200m-XX:+UnlockDiagnosticVMOptions-XX:+LogVMOutput-XX:LogFile=../nexusdata/nexus3/log/jvm.log-XX:-OmitStackTraceInFastThrow-Djava.net.preferIPv4Stack=true-Dkaraf.home=.-Dkaraf.base=.-Dkaraf.etc=etc/karaf-Djava.util.logging.config.file=etc/karaf/java.util.logging.properties-Dkaraf.data=../nexusdata/nexus3-Dkaraf.log=../nexusdata/nexus3/log-Djava.io.tmpdir=../nexusdata/nexus3/tmp-Dkaraf.startLocalConsole=false-Djdk.tls.ephemeralDHKeySize=2048-Djava.endorsed.dirs=lib/endorsed启动服务,由于nexus依赖java环境,需要提前安装java环境。
yum install -y java-1.8.0-openjdksudo systemctl daemon-reloadsudo systemctl enable nexus.servicesudo systemctl start nexus.service登录测试

查看提示路径文件,查看密码登录。

参考链接
边栏推荐
- Recommandation de la Bibliothèque open source de programmation
- In depth research and analysis report on global and Chinese sanitary safety product market
- Top 10 bone conduction earphones in the list, and five easy-to-use bone conduction earphones are recommended
- Vi LXD deployment of lab server for development records
- 解决循环依赖BUG。Relying upon circular references is discouraged and they are prohibited by default.
- System.out.println()方法使用需要注意哪些问题
- In depth research and analysis report on global and Chinese high purity molybdenum market
- Sqlmap detection SQL lab range
- 基于FPGA的VGA协议实现
- MySQL advanced statement
猜你喜欢

2022.2.28 variable length sequence table

Just after the college entrance examination, I was confused and didn't know what to do? Tell me what I think

Introduction to reverse learning - excellent assembly debugging tool OllyDbg

MySQL create table error 1067 - invalid default value for 'update_ time‘

Variable parameter expression

Question bank and answers of the latest national fire-fighting facility operators (primary fire-fighting facility operators) in 2022

折叠表达式

树莓派获得网络安装系统功能,无需借助其他设备
![[Clickhouse column] user initialization of new library role](/img/00/a11fb1a8e38ed4e0634839160c8ead.png)
[Clickhouse column] user initialization of new library role

Ali, tell me about the application scenarios of message oriented middleware?
随机推荐
Part 23, two-way circular linked list model.
【clickhouse专栏】新建库角色用户初始化
In depth research and analysis report on global and Chinese hydrogen fuel station market
sqlmap检测SQL-lab靶场
提取式存储才是最佳的记忆方法
Just after the college entrance examination, I was confused and didn't know what to do? Tell me what I think
gensim.models word2vec 参数
Ali, tell me about the application scenarios of message oriented middleware?
Powerful full text search tool anytxt searcher
Vi LXD deployment of lab server for development records
Leetcode 1962. Remove stones to minimize the total amount (should be rounded up)
Which exchange is PTA futures on? How can PTA futures be safe?
Implementation of VGA protocol based on FPGA
In depth research and analysis report on ready to eat meat market for vacuum low temperature cooking in the world and China
【Try to Hack】URL
System.out.println()方法使用需要注意哪些问题
[pyhton crawler] regular expression
Leetcode 1962. 移除石子使总数最小(应该是向上取整)
2021-2027 China scaffold and accessories market status analysis and development prospect forecast report
Leetcode 1968. 构造元素不等于两相邻元素平均值的数组(可以,终于解决)