1. The significance of building nexus service As a unified proxy for the intranet, when developing collaboratively in a team, everyone does not need to download from the external network once; Solve the problem that some abnormal companies cannot access the external network due to internal network control. Choose a machine with external network permissions to build the server, and the rest of the people can directly access this service through the internal network; Solve Maven project dependency issues during teamwork development; 2. Install Nexus # Download the installation package: wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.4-03-bundle.tar.gz # Unzip mkdir /data/apps cd /data/apps tar -zxvf ~/nexus-2.14.4-03-bundle.tar.gz 3. Configure Nexus Edit the configuration file: vim conf/nexus.properties # Jetty section application-port=8081 # Access port application-host=0.0.0.0 # Bind IP nexus-webapp=${bundleBasedir}/nexus # Specify the nexus program directory nexus-webapp-context-path=/nexus # Specify two sets of directories to access # Nexus section nexus-work=${bundleBasedir}/../sonatype-work/nexus runtime=${bundleBasedir}/nexus/WEB-INF The above are all default configurations, and the corresponding access address is: http://xxxx:8081/nexus If you want to change to http://xxxx:8081, just modify nexus-webapp-context-path=/ 4. Start Nexus Startup script: bin/nexus # The startup script has the following optional parameters [root@ci-gitlab nexus-2.14.4-03]# bin/nexus Usage: ./nexus { console | start | stop | restart | status | dump } Note: Nexus uses wrapper as a WEB container. Nexus is just a shell script, which will eventually call the wrapper binary file in the corresponding platform under the jsw directory. 5. Manage Nexus 1. Default user: admin/admin123 deployment/deployment123 2. Modify user information After logging in as admin, click [Security-Users] on the left, select a user in the list, right-click to change the password and re-password, and modify the rest of the user information in the table at the bottom 6. Using Nexus in your project 1. As a plugin library Click [Views/Repositories-Repositories] on the left, select [Public Repositories], copy its Repository Path field, edit the pom.xml file, and add the following section: <!-- Set the main warehouse and search in the set order. --> <!-- Set the main warehouse and search in the set order. --> <repositories> <repository> <id>releases</id> <name>Team Nexus Repository</name> <url>${Repository Path}</url> </repository> <repository> <id>snapshots</id> <name>Team Nexus Repository</name> <url>${Repository Path}</url> </repository> </repositories> 2. As a deploy library Click [Views/Repositories-Repositories] on the left, select [Release or Snapshots], copy its Repository Path field, edit the pom.xml file, and add the following section: <!-- Set the publishing location, used when mvn deploy, an error will be reported if not set--> <distributionManagement> <repository> <id>ci-releases</id> <name>Gigold Nexus Repository</name> <url>http://ci-gitlab:8081/content/repositories/releases</url> </repository> <snapshotRepository> <id>ci-snapshots</id> <name>Gigold Nexus Repository</name> <url>http://ci-gitlab:8081/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> Note: If the distributionManagement section is not set, executing mvn deploy will report the following error:
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to use bar charts in Vue and modify the configuration yourself
>>: Install Apache2.4+PHP7.0+MySQL5.7.16 on macOS Sierra
For those who are new to virtual machines or have...
【Foreword】 Both Vue and React's CSS modular s...
Table of contents 1. Anti-shake function 2. Use d...
Build a simulation environment: Operating system:...
Effect: <!doctype html> <html> <he...
max_allowed_packet is a parameter in MySQL that i...
Prepare a CentOS6 installation disk (any version)...
1. Install zabbix-agent on web01 Deploy zabbix wa...
Table of contents Preface vue.config.js configura...
Sending emails using PHP's mail function The ...
Table of contents 1. Scope 2. Function return val...
Table of contents 1. Install the proxy module 2. ...
Putting aside databases, what is dialect in life?...
Table of contents 1. Software Package 2. Install ...
1. Create a new user wwweee000 [root@localhost ~]...