Centos7使用nexus搭建maven仓库

  1. 安装jdk
  2. 安装maven
    tar -zxvf apache-maven-3.6.0-bin.tar.gz
    vi /etc/profile
    export MAVEN_HOME=/home/apache-maven-3.6.0 export PATH=$MAVEN_HOME/bin:$PATH
    source /etc/profile
    mvn -v
  3. 安装nexus
    下载unix版本https://www.sonatype.com/download-oss-sonatype
    tar -zxvf nexus-3.15.2-01-unix.tar.gz
    #授权
    chmod a+x / /home/nexus-3.15.2-01/bin/*
    #启动
    /home/nexus-3.15.2-01/bin/nexus start
    #关闭
    /home/nexus-3.15.2-01/bin/nexus stop
    #查看是否启动
    /home/nexus-3.15.2-01/bin/nexus console
    #可修改配置文件,端口,ip等,ip必须为本机ip否则无法使用
    vi /home/nexus-3.15.2-01/etc/nexus-default.properties
    application-port=8888
    application-host=192.168.1.101
    nexus-context-path=/nexus
    #验证是否正常
    http://192.168.1.101:8888/nexus/
    默认账户admin/admin123
  4. 创建maven仓库
    最上方设置/Repostory/Repositories/Create repository
    maven2(hosted)
    Hosted选择Allow redepoly
    说明
    maven2(proxy):远程仓库的代理,本地找,找不少上远程仓库下载
    maven2(hosted):宿主仓库,手动上传
    maven2(group):仓库组,不需要配置多个pom的地址,需要group自行配置,注意缓存
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值