• 搭建Nexus私服实现本地拉取依赖包


    搭建Nexus私服实现本地拉取依赖包

    转载于https://dbawsp.com/1439.html

    安装JDK与Nexus环境:

    修改主机名:

    hostnamectl set-hostname nexus
    bash
     

    网站内搜索:

    jdk-8u181-linux-x64.rpm
    mkdir /home/tools && cd /home/tools
     

    点击下载JDK环境RPM包

    rpm -ivh jdk-8u181-linux-x64.rpm
     

    下载Nexus程序:

    点击下载Nexus程序包

    部署并启动Nexus程序:

    tar xf nexus-3.13.0-01-unix.tar.gz
    mv nexus-3.13.0-01 /usr/local/nexus
    cd /usr/local/nexus/bin/
    ./nexus start
     
    • Nexus会把所有磁盘当成存储空间,硬盘越大,启动越慢

    查看Nexus端口:

    netstat -tunpl|grep '8081'
     

    界面操作Nexus:

    用户:admin
    密码:admin123
     

    配置Maven全局配置:

    cd /usr/local/maven/conf/ && vim settings.xml
     
    • 找到 标签,添加 Nexus 默认认证信息:(132行下)
        <server>
            <id>my-nexus-releases</id>
            <username>admin</username>
            <password>admin123</password> 
          </server>
          <server>
            <id>my-nexus-snapshot</id>
            <username>admin</username>
            <password>admin123</password>
          </server>
     
    • 找到 标签,在修改server标签后添加镜像:(168行下)
        <mirror>
          <!--This sends everything else to /public -->
          <id>nexus</id>
          <mirrorOf>*</mirrorOf>
          <url>http://10.0.0.80:8081/repository/maven-public/</url>
        </mirror>
     
    • 找到 标签,在修改mirrir标签后添加仓库信息:(262行下)
    <profile>
      <id>nexus</id>
      <!--Enable snapshots for the built in central repo to direct -->
      <!--all requests to nexus via the mirror -->
      <repositories>
        <repository>
          <id>central</id>
          <url>http://10.0.0.80:8081/repository/maven-public/</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://10.0.0.80:8081/repository/maven-public/</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
     
    • 激活仓库:(293行下)
    <activeProfiles>
      <!--make the profile active all the time -->
      <activeProfile>nexus</activeProfile>
    </activeProfiles>
     

    上传并解压jeesns源码包:

    cd /tmp/ && tar xf jeesns.tar.gz && cd jeesns/
     

    编译源码包:

    rm -rf /root/.m2/
    mvn clean package
     

  • 相关阅读:
    QBoxLayout中setSpacing(int)和addSpacing(int)的区别
    BZOJ1017 树形DP
    树形DP 2415HDU
    树形DP基础题 HDU1520
    最小生成树个数 并查集压缩路径
    伸展树基本概念基本题目
    BZOJ1010单调性DP优化
    BZOJ1009 矩阵快速幂+DP+KMP
    字典树(数组实现)
    poj 1611 The Suspects(并查集输出集合个数)
  • 原文地址:https://www.cnblogs.com/cheyunhua/p/14189790.html
Copyright © 2020-2023  润新知