美文网首页
阿里云centos7.4安装nexus

阿里云centos7.4安装nexus

作者: 威先生2018 | 来源:发表于2019-03-23 19:41 被阅读0次

    准备材料

    系统:centos7.4、nexus-2.11.2-03、jdk1.8(跳过讲解安装)

    nexus-2.11.2-03下载地址方式:

    方式一:https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz,下载完上传到服务器;

    方式二:服务器输入指令:wget  https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz

    安装步骤

    1.进入usr目录并且创建nexus包并且下载:

    ```

    cd /usr

    mkdir nexus

    wget  https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz

    ```

    2.解压

    ```

    tar zxvf  /usr/nexus/nexus-2.11.2-03-bundle.tar.gz

    ```

    3.配置环境

    ···

    vim /etc/profile

    ```

    3.1在配置文件最后加入以下脚本

    ````

    export MAVEN_HOME=/usr/nexus/nexus-2.11.2-03-bundle

    export PATH=$PATH:$MAVEN_HOME/bin

    ···

    3.2重新加载配置文件,让配置生效。

    ```

    source /etc/profile

    ```

    4.启动nexus

    进入bin目录启动:

    ```

    cd /usr/nexus/nexus-2.11.2-03-bundle/bin

    ./nexus start

    ```

    备注:启动 :./nexus start  重启:./nexus restart  停止:./nexus stop

    5.检验是否启动成功


    5.1日志校验

    6.去阿里云配置开放8081网关

    7.登录

    账号密码默认:admin  admin123
    http://xxxx:8081/nexus/#welcome

    8.遇到的坑

    8.1启动权限问题

    解决方法一(临时):

    ```

    export RUN_AS_USER=root

     ./nexus start

    ```

    解决方法二(永久):

    在系统用配置即可,输入:vi /etc/profile向其中加入exportRUN_AS_USER=root,修改后保存退出

    8.2登录到后台

    http://xxxx:8081/nexus/

    相关文章

      网友评论

          本文标题:阿里云centos7.4安装nexus

          本文链接:https://www.haomeiwen.com/subject/hmasvqtx.html