Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build Nexus3 private server

2025-04-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to build Nexus3 private server, I believe that many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Official document

Introduction to Nexus warehouse (supports maven, yum, docker private server, etc.)

There are three types of warehouses:

Proxy: is the agent of the remote warehouse. For example, when a proxy of central repository is configured in nexus, when a user requests an artifact from the proxy, the proxy will first find it locally. If it cannot be found, it will download it from the remote warehouse and return it to the user, which is equivalent to a transit.

Hosted: is the host repository, users can deploy some of their own components to hosted, or you can manually upload components to hosted. For example, oracle's driver, ojdbc6.jar, is not available in central repository, so it needs to be manually uploaded to hosted, which is generally used to store the company's own jar package.

Group: it's a warehouse group. There's no such concept in maven. It's unique to nexus. The purpose is to aggregate the above multiple repositories and expose a unified address to users, so that users do not need to configure multiple addresses in pom, but just configure the address of group uniformly. The Repository Path on the right can click in and see the artifact list in the warehouse. However, pay attention to the browser cache. When your project wants to use resources in multiple repository, you don't need to refer to it multiple times, you just need to reference a group.

A collection of maven-public:maven-central, maven-release and maven-snapshot libraries.

Maven-release: the jar package used to store the release version.

Maven-snapshot: the jar package used to store the snapshot version.

1. Docker sets up Nexus3 (CentOS) download image

$docker pull sonatype/nexus3:latest

Create a file directory

$mkdir / data/nexus & & chown-R 200 / data/nexus

Run Mirror

$docker run-- restart=always-d-p 8081 name nexus3-v / data/nexus:/nexus-data sonatype/nexus3:latest

The default account is admin and the default password is admin123

If the password for a new version, such as nexus3, has been changed from the default to randomly generated, check the initial password

$docker exec-it nexus3 bash

$cat nexus-data/admin.password

Second, set up Nexus3 (Windows)

Nexus3 download

Install to service

Installation directory > nexus.exe / install nexus3

III. Nexus3 configuration instructions

Access: http://ip:8081/ uses the administrator to log in and start the following operations

1. Create Blob Stores

two。 Create a warehouse

3. Select the warehouse type (see the description of the warehouse type at the beginning of the article)

4. Configure public exit maven-public (group)

Fourth, instructions for use 1. Configure private server (setting.xml or pom.xml of the project specify the maven-public of maven private server)

two。 Publish local project to Nexus private server and configure connection method

Configure settings.xml for Maven

Release

Admin

Admin123

Snapshots

Admin

Admin123

Configure the pom.xml of the project

Release

User release resp

Http://xxx.xxx.xxx.xxx:8081/repository/releases/

Snapshots

User snapshots resp

Http://xxx.xxx.xxx.xxx:8081/repository/snapshots/

After reading the above, have you mastered the method of how to build Nexus3 private server? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report