zoukankan      html  css  js  c++  java
  • CentOS 7 使用Nexus3搭建maven私服

    安装jdk(略)

    安装maven

    wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
    
    tar -zxf apache-maven-3.5.4-bin.tar.gz 

    添加环境变量

    vim /etc/profile

    在文件下方添加如下内容(这里的MAVEN_HOME需要改为你自己的maven解压目录):

    export MAVEN_HOME="/opt/apache-maven-3.5.4"
    export PATH="$MAVEN_HOME/bin:$PATH"

    安装nexus

    在这里下载
    https://www.sonatype.com/download-oss-sonatype

    wget https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/3/nexus-3.13.0-01-unix.tar.gz
    tar -zxf nexus-3.13.0-01-unix.tar.gz
     cd nexus-3.13.0-01/bin/
    ./nexus start

    注意: 出现了root用户不建议的警告,解决方法如下

    run_as_user="root"

    在浏览器中输入
    http://ip:8081/

    点击右上角的sign in登录,输入账户admin,密码admin123即可登录成功。

     常用命令

    ./nexus run命令行输出 前台进程 可以使用Ctril+c停止Nexus
    ./nexus start: 在后台启动Nexus服务
    ./nexus stop: 停止后台的Nexus服务
    ./nexus status : 查看后台Nexus服务状态
    ./nexus restart: 重新启动后台的Nexus服务

    配置
    修改nexus-3.13.0-01/etc/nexus-default.properties配置文件中的

    application-port=8081

    FAQ
    提示System Requirement: max file descriptors [4096] likely too low, increase to at least [65536].

    vim /etc/security/limits.conf
    
    * soft nofile 65536
    * hard nofile 65536

    然后重启

    ./nexus restart

    如果你创建了nexus用户 就用nexus替代root 我这里为了方便 就没有专门建nexus用户

    有问题可以查查官方文档
    https://help.sonatype.com/docs

  • 相关阅读:
    Docker创建tomcat镜像简单使用
    Eclipse和Jdk版本问题
    HashTable源码阅读
    HashMap源码阅读
    报错:Multiple annotations found at this line:
    python全栈开发学习03
    python全栈开发学习 02
    关于termux在手机上搭载Linux系统,python,ssh
    python全栈开发学习 01
    机器学习实战
  • 原文地址:https://www.cnblogs.com/aqicheng/p/11394151.html
Copyright © 2011-2022 走看看