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

Detailed steps for building a nexus server

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

I. the significance of building nexus services

As a unified agent of the intranet, everyone doesn't have to go to the external network to download it once when developing in a team.

To solve the problem that the internal network control of some abnormal companies cannot access the external network, choose a machine with the permission of the external network to build the server, and the others directly access the service through the internal network.

Solve the problem of maven project dependency during teamwork development

Second, install nexus

# download installation package: wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.4-03-bundle.tar.gz# decompress mkdir / data/appscd / data/appstar-zxvf ~ / nexus-2.14.4-03-bundle.tar.gz

3. Configure nexus

Edit profile: vim conf/nexus.properties

# Jetty sectionapplication-port=8081 # access port application-host=0.0.0.0 # bind IPnexus-webapp=$ {bundleBasedir} / nexus # specify nexus program directory nexus-webapp-context-path=/nexus # specify two groups of directories to visit # Nexus sectionnexus-work=$ {bundleBasedir} /.. / sonatype-work/nexusruntime=$ {bundleBasedir} / nexus/WEB-INF

The above are all default configurations, and the corresponding access address is: http://x.x.x.x:8081/nexus

If you want to change to http://x.x.x.x:8081, you can modify nexus-webapp-context-path=/

4. Start nexus

Startup script: bin/nexus

# Startup script has the following parameters: [root@ci-gitlab nexus-2.14.4-03] # bin/nexusUsage:. / nexus {console | start | stop | restart | status | dump}

Note: nexus uses wrapper as the WEB container, nexus is just a shell script, and eventually calls the wrapper binaries in the corresponding platform under the jsw directory.

5. Manage nexus

1. Default user:

Admin/admin123 deployment/deployment123

two。 Modify user information

After admin logs in, click [Security-Users] on the left, select the user in the list, right-click to change the password and tight encirclement password, and modify the rest of the user's information in the table at the bottom.

Use nexus in the project

1. As a plug-in library

Click [Views/Repositories-Repositories] on the left, select [Public Repositories], and copy its Repository Path field.

Edit the pom.xml file and add the following paragraph:

Releases Team Nexus Repository ${Repository Path} snapshots Team Nexus Repository ${Repository Path}

two。 As a deploy library

Click [Views/Repositories-Repositories] on the left, select [Release or Snapshots], and copy its Repository Path field.

Edit the pom.xml file and add the following paragraph:

Ci-releases Gigold Nexus Repository http://ci-gitlab:8081/content/repositories/releases ci-snapshots Gigold Nexus Repository http://ci-gitlab:8081/content/repositories/snapshots/

Note: if the distributionManagement segment is not set, the following error will be reported when executing mvn deploy:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project helloworld-a: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in-DaltDeploymentRepository=id::layout::url parameter-> [Help 1]

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

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