当前位置:网站首页>Mavn builds nexus private server
Mavn builds nexus private server
2022-07-02 15:09:00 【Cloud computing security】
Catalog
One 、 Purpose
occasionally Java Development is building projects , Because there are some dependencies, the whole project will be built , thus Jenkins Construction is very slow , It takes four to five minutes to complete the construction . So you can build Mavn Private clothes Nexus, Development will be public jar Upload the package to Nexus, In this way, no additional construction is required during construction , So as to improve Jenkins Build performance .
Two 、 Deploy
1、 download
Nexus edition :3.x
Nexus Installation package download link :https://help.sonatype.com/repomanager3/product-information/download
2、 decompression
[[email protected] ~]# tar xzf nexus-3.39.0-01-unix.tar.gz
3、 To configure
To configure JDK route :
[[email protected] ~]# cd nexus-3.39.0-01/bin/
[[email protected] bin]# cat nexus
...
# Uncomment the following line to override the JVM search sequence
# INSTALL4J_JAVA_HOME_OVERRIDE=
# Uncomment the following line to add additional VM parameters
# INSTALL4J_ADD_VM_PARAMS=
INSTALL4J_JAVA_HOME_OVERRIDE=/opt/jdk
...
modify JVM Heap size ( The default is 2703M): Modify... According to the actual situation
[[email protected] ~]# cd nexus-3.39.0-01/bin/
[[email protected] bin]# cat nexus.vmoptions
...
-Xms512m
-Xmx512m
...
Modify the default port ( The default is 8081):
[[email protected] ~]# cd nexus-3.39.0-01/etc/
[[email protected] etc]# cat nexus-default.properties
...
application-port=8181
application-host=0.0.0.0
...
4、 start-up
[[email protected] ~]# cd nexus-3.39.0-01/bin/
# This startup is background startup
[[email protected] bin]# ./nexus start
WARNING: ************************************************************
WARNING: Detected execution as "root" user. This is NOT recommended!
WARNING: ************************************************************
Starting nexus
# stop it
# [[email protected] bin]# ./nexus stop
# restart
# [[email protected] bin]# ./nexus restart
# The front desk starts ( Print log )
# [[email protected] bin]# ./nexus run
5、 visit
http://139.198.105.50:8181/
Click on the top right corner Sign in
Sign in
user name :admin
password :find Look for ( Generally speaking, it is related to Nexus The extracted files of are in the same directory )
[[email protected] bin]# find / -name "admin.password" /root/sonatype-work/nexus3/admin.password [[email protected] ~]# cd /root/sonatype-work/nexus3/ [[email protected] nexus3]# cat admin.password 4649fc72-d96b-44a5-93eb-e7101db22072
After entering the initial password, you will be prompted to set a new password :
The last to enter web page :
thus ,Nexus installation is complete !! Then there are some operations .
3、 ... and 、FAQ
1、JDK Version of the problem
# current version 11.X
[[email protected] opt]# java -version
java version "11.0.2" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+7-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+7-LTS, mixed mode)
# Initiate error reporting ( say JDK Version must be 1.8.X)
[email protected] bin]# ./nexus start
No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be 1.8.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.
2、 Solution
Reduce JDK Version is 1.8.X To solve the problem .
[[email protected] opt]# wget https://mirrors.tuna.tsinghua.edu.cn/AdoptOpenJDK/8/jdk/x64/linux/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz
[[email protected] opt]# tar xzf OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz
# Original JDK Home directory mv Backup
[[email protected] opt]# mv /opt/jdk /opt/jdk.bak
# the 1.8.X edition mv Renamed as JDK that will do
[[email protected] opt]# mv jdk8u322-b06/ jdk
# Now look at the current JDK edition ( It has come down )
[[email protected] opt]# java -version
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (Temurin)(build 25.322-b06, mixed mode)
边栏推荐
猜你喜欢
【C语言】详解指针的初阶和进阶以及注意点(1)
.NET Core 日志系统
Dragonfly low code security tool platform development path
GeoServer offline map service construction and layer Publishing
[noi Simulation Competition] scraping (dynamic planning)
mathjax 入门(web显示数学公式,矢量的)
Base64 编码原来还可以这么理解
【NOI模拟赛】伊莉斯elis(贪心,模拟)
The past and present lives of visual page building tools
07_哈希
随机推荐
Kityformula editor configure font size and spacing
About text selection in web pages and counting the length of selected text
C RichTextBox controls the maximum number of lines displayed
2021-2022學年編譯原理考試重點[華僑大學]
Learn the method code of using PHP to realize the conversion of Gregorian calendar and lunar calendar
Niuke Practice 101
taobao. trade. memo. Add (add remarks to a transaction) interface, Taobao store flag insertion interface, Taobao order flag insertion API interface, oauth2.0 interface
C语言实现N皇后问题
MFC timer usage
LeetCode_字符串_简单_412.Fizz Buzz
Leetcode - Search 2D matrix
Solve the problem that El radio group cannot be edited after echo
[development environment] install the visual studio community 2013 development environment (download the installation package of visual studio community 2013 with update 5 version)
AtCoder Beginner Contest 254
可视化搭建页面工具的前世今生
【无标题】LeetCode 2321. 拼接数组的最大分数
MFC CString to char*
Huawei interview question: no palindrome string
C语言习题---(数组)
.NET Core 日志系统