婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > nexus服務器搭建的詳細步驟

nexus服務器搭建的詳細步驟

熱門標簽:地圖標注w是什么方向 福州呼叫中心外呼系統哪家好 河南省鄭州市地圖標注 七大洲地圖標注 地圖標注需要提交啥資料入駐 昆明外呼系統 新鄉人工智能電話機器人加盟 臨汾電銷機器人費用 400電話申請找哪家公司

一、搭建nexus服務的意義

作為內網的統一代理,團隊合作開發時不用每人都去外網下載一次;

解決部分變態公司內網管制無法訪問外網的問題,選一臺有外網權限的機器搭建服務器,其余人直接內網訪問此服務;

團隊合作開發時解決maven項目依賴問題;

二、安裝nexus

# 下載安裝包:
wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.14.4-03-bundle.tar.gz

# 解壓
mkdir /data/apps
cd /data/apps
tar -zxvf ~/nexus-2.14.4-03-bundle.tar.gz

三、配置nexus

編輯配置文件:vim conf/nexus.properties

# Jetty section
application-port=8081   # 訪問端口
application-host=0.0.0.0  # 綁定IP
nexus-webapp=${bundleBasedir}/nexus  # 指定nexus程序目錄
nexus-webapp-context-path=/nexus   # 指定訪問的二組目錄

# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF

以上都是默認配置,對應的訪問地址為: http://x.x.x.x:8081/nexus

如果要改為http://x.x.x.x:8081,則修改nexus-webapp-context-path=/即可

四、啟動nexus

啟動腳本:bin/nexus

# 啟動腳本有如下參數可選
[root@ci-gitlab nexus-2.14.4-03]# bin/nexus
Usage: ./nexus { console | start | stop | restart | status | dump }

注意:nexus采用wrapper做為WEB容器,nexus只是shell腳本,最終會調用jsw目錄下對應平臺中的wrapper二進制文件

五、管理nexus

1. 默認的用戶:

admin/admin123 
deployment/deployment123

2. 修改用戶信息

admin登陸后,點擊左側【Security–Users】,在列表中選擇用戶,右鍵可更改密碼和重圍密碼, 底部表格中可修改用戶其余信息

六、在項目中使用nexus

1. 作為插件庫

點擊左側【Views/Repositories–Repositories】,選擇【Public Repositories】,復制其Repository Path字段
編輯pom.xml文件,添加如下段:

<!-- 設定主倉庫,按設定順序進行查找。 -->
<!-- 設定主倉庫,按設定順序進行查找。 -->
  <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. 作為deploy庫

點擊左側【Views/Repositories–Repositories】,選擇【 Release 或 Snapshots】,復制其Repository Path字段
編輯pom.xml文件,添加如下段:

<!-- 設定發布位置,mvn deploy時用到,不設置時會報錯-->
  <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>

注意:不設置distributionManagement段,執行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]

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

標簽:臨沂 岳陽 鎮江 烏海 四川 股票 紅河

巨人網絡通訊聲明:本文標題《nexus服務器搭建的詳細步驟》,本文關鍵詞  nexus,服務器,搭建,的,詳細,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《nexus服務器搭建的詳細步驟》相關的同類信息!
  • 本頁收集關于nexus服務器搭建的詳細步驟的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 东方市| 桐城市| 彝良县| 上林县| 曲麻莱县| 宽甸| 进贤县| 古丈县| 驻马店市| 康保县| 鹿邑县| 兴宁市| 博乐市| 中宁县| 葵青区| 运城市| 高雄市| 连平县| 峨眉山市| 乡宁县| 临海市| 会宁县| 南江县| 竹山县| 怀宁县| 阳原县| 屯留县| 尚志市| 京山县| 睢宁县| 汪清县| 类乌齐县| 兴城市| 鄢陵县| 罗田县| 桐城市| 洛扎县| 阿克| 浏阳市| 海原县| 嘉义县|