日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

从零开始搭建系统2.1——Nexus安装及配置

發布時間:2025/7/14 windows 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 从零开始搭建系统2.1——Nexus安装及配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

在安裝配置Nexus時,請先確定您已經配置好jdk

1.創建目錄

2.下載安裝包

[root@localhost usr]# cd nexus

下載地址:https://www.sonatype.com/download-oss-sonatype

wget https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/3/nexus-3.9.0-01-unix.tar.gz

3.解壓安裝包

tar -zxvf nexus-3.9.0-01-unix.tar.gz

解壓之后生成兩個文件夾,分別為nexus-2.3.1-01、sonatype-work

?

4.啟動

進入到bin目錄下,執行./nexus start

解決上面的提示:

創建nexus用戶

groupadd nexus#創建組

useradd nexus?-g nexus#創建用戶并將用戶添加到組

?#修改文件所有者

chown -R nexus??/usr/nexus/

修改?nexus 腳本,指定啟動用戶

?

5.開啟8081端口

添加

firewall-cmd?--zone=public?--add-port=8081/tcp?--permanent ? ?(--permanent永久生效,沒有此參數重啟后失效) 重新載入 firewall-cmd?--reload 查看 firewall-cmd?--zone=?public?--query-port=8081/tcp 查看所有打開的端口 firewall-cmd --zone=public?--list-ports

?5.驗證是否啟動成功

http://192.168.0.200:8081

?

出現上述頁面,說明配置nexus成功!

點擊右上角“Log in”, 輸入用戶名和密碼(默認用戶名:admin ? ? ?密碼: admin123)登錄。

6.開機啟動

sudo ln -s /usr/nexus/nexus-3.9.0-01/bin/nexus /etc/init.d/nexus

使用
service nexus status/start/stop
查看nexus服務狀態、啟動服務、停止服務等

使用
chkconfig nexus on/off

設置nexus服務開機自啟動或者開機不啟動

?

如果啟動不起來的話可以用下面方式啟動,通過啟動日志查找問題

service nexus start-launchd

7.配置nexus

新建store

?

8.proxy私倉,使用的外部私倉是阿里的倉庫http://maven.aliyun.com/nexus/content/groups/public:

?

?9.release私倉

?

10.snapshot私倉

11.group私倉組

12.如何在項目中使用

settings.xml 配置

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<localRepository>D:\.m2\repository</localRepository>

<pluginGroups>
<pluginGroup>org.sonatype.plugins</pluginGroup>
</pluginGroups>

<proxies>
</proxies>

<servers>
<server>
<id>Releases</id>
<username>admin</username>
<password>admin123</password>
</server>

<server>
<id>Snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>

<mirrors>

<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.0.200:8081/repository/nexus-public/</url>
</mirror>
</mirrors>

<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>

</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>

項目pom配置

<distributionManagement>
<repository>
<id>Releases</id>
<name>Releases</name>
<url>http://192.168.0.200:8081/repository/nexus-releases</url>
</repository>
<snapshotRepository>
<id>Snapshots</id>
<name>Snapshots</name>
<url>http://192.168.0.200:8081/repository/nexus-snapshots</url>
</snapshotRepository>
</distributionManagement>

?

?

13.直接deploy即可

?

?14.設置可重復deploy

如果需要可重復deploy同一個版本的jar包,可進行如下配置

?

?

?

轉載于:https://www.cnblogs.com/provence666/p/8638558.html

總結

以上是生活随笔為你收集整理的从零开始搭建系统2.1——Nexus安装及配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。