`
rensanning
  • 浏览: 3514019 次
  • 性别: Icon_minigender_1
  • 来自: 大连
博客专栏
Efef1dba-f7dd-3931-8a61-8e1c76c3e39f
使用Titanium Mo...
浏览量:37479
Bbab2146-6e1d-3c50-acd6-c8bae29e307d
Cordova 3.x入门...
浏览量:604323
C08766e7-8a33-3f9b-9155-654af05c3484
常用Java开源Libra...
浏览量:678071
77063fb3-0ee7-3bfa-9c72-2a0234ebf83e
搭建 CentOS 6 服...
浏览量:87257
E40e5e76-1f3b-398e-b6a6-dc9cfbb38156
Spring Boot 入...
浏览量:399816
Abe39461-b089-344f-99fa-cdfbddea0e18
基于Spring Secu...
浏览量:69067
66a41a70-fdf0-3dc9-aa31-19b7e8b24672
MQTT入门
浏览量:90474
社区版块
存档分类
最新评论

CentOS 安装 Nexus

阅读更多
前提:Java

1)下载
# cd /usr/local/src/
# wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
# tar -zxvf nexus-latest-bundle.tar.gz
# mv /usr/local/src/nexus-2.14.1-01 /usr/local/nexus
# rm -rf sonatype-work/


2)配置
# vi /usr/local/nexus/bin/nexus
  NEXUS_HOME="/usr/local/nexus"
  RUN_AS_USER="nexus"
  PIDDIR=${NEXUS_HOME}
# vi /usr/local/nexus/conf/nexus.properties
  application-port=8081
  nexus-work=${bundleBasedir}/sonatype-work/nexus
# vi /usr/local/nexus/bin/jsw/conf/wrapper.conf
  wrapper.java.maxmemory=768


3)修改用户
# groupadd nexus
# useradd nexus -g nexus
# cd /usr/local/
# chown -R nexus:nexus nexus


4)测试配置
# /usr/local/nexus/bin/nexus console
  Started InstrumentedSelectChannelConnector@0.0.0.0:8081
# /usr/local/nexus/bin/nexus stop


5)启动服务
# cp /usr/local/nexus/bin/nexus /etc/init.d/nexus
# chmod 755 /etc/init.d/nexus
# service nexus start
  Starting Nexus OSS...
  Started Nexus OSS.
# tail -f /usr/local/nexus/logs/wrapper.log


6)设置代理服务
管理页面URL:http://<IP>:8081/nexus
账户:admin / admin123

通过 Views/Repositories -> Repositories -> Add -> Proxy Repository,创建以下两个代理:

<Maven代理仓库>
引用
Repository ID :proxied-maven-repo
Repository Name :proxied-maven-repo
Provider :Maven2
Remote Storage Location :http://maven.aliyun.com/nexus/content/groups/public/



<NPM代理仓库>
引用
Repository ID :proxied-npm-repo
Repository Name :proxied-npm-repo
Provider :npm
Remote Storage Location :https://registry.npm.taobao.org/



引用

代理仓库地址:
http://<IP>:8081/nexus/content/repositories/proxied-maven-repo/
http://<IP>:8081/nexus/content/repositories/proxied-npm-repo/


7)测试确认:

<Maven代理仓库确认>
C:\Users\rensanning\.m2\settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings>
  <mirrors>
    <mirror>
      <id>my-repo</id>
      <mirrorOf>*</mirrorOf>
      <url>http://<IP>:8081/nexus/content/repositories/proxied-maven-repo/</url>
    </mirror>
  </mirrors>
</settings>

# mvn package


<NPM代理仓库确认>
# npm config set registry http://<IP>:8081/nexus/content/repositories/proxied-npm-repo/
# npm install -g underscore


<下载文件确认>
# cd /usr/local/nexus
# ll sonatype-work/nexus/storage/proxied-maven-repo
# ll sonatype-work/nexus/storage/proxied-npm-repo


<下载日志确认>
# tail -f /usr/local/nexus/sonatype-work/nexus/logs/request.log
  • 大小: 186 KB
  • 大小: 179.3 KB
分享到:
评论

相关推荐

    centos7安装nexus3

    centos7安装nexus3

    CentosOS 7 安装 Nexus OSS 3

    CentosOS 7 安装 Nexus OSS 3,以及nexus 3 仓库public地址

    CentOS7 Nexus安装步骤详细介绍

    主要介绍了CentOS7 Nexus安装步骤详细介绍的相关资料,这里对CentOS7 安装Nexus 进行了详细介绍,需要的朋友可以参考下

    ansible-nexus3-oss, Ansible角色为 redhat/centos提供 Nexus 仓库管理器 3.x.zip

    ansible-nexus3-oss, Ansible角色为 redhat/centos提供 Nexus 仓库管理器 3.x Ansible角色:Nexus 3-操作系统这里角色在 centos/rhel上安装和配置 Nexus 存储库管理器 操作系统 版本 3.x 。除了 blobstores -related...

    在CentOS7上用Nexus3搭建Maven私服.doc

    CentOS 7里需要安装jdk8和Maven3,具体的安装步骤可以百度一下。 二、需要的包 需要nexus3的安装包,官网上https://www.sonatype.com/download-oss-sonatype下载unix版本的会比较慢,推荐...

    docker快速安装nexus-CentOS7

    docker pull sonatype/nexus3 2.创建/usr/local/docker/nexus/docker-compose.yml文件  version: ‘3.1’ services:  nexus:  image: ‘sonatype/nexus3’  restart: always  container_name: nexus  ports: ...

    nexus3.31.0

    linux/centos的nexus3.31.0安装文件

    nexus-2.14.14-01-bundle.zip

    nexus-2.14.14-01-bundle.zip 安装文件,内包含centos 安装教程 nexus-2.14.14-01-bundle.zip 安装文件,内包含centos 安装教程 nexus-2.14.14-01-bundle.zip 安装文件,内包含centos 安装教程

    Centos下Maven私服Nexus3.x环境构建的完整操作记录(个人精华版)

    本篇文章详细记录了Centos下Maven私服Nexus3.x环境构建的完整过程,介绍十分详细,可以作为线上长期部署手册。有需要的朋友,请拿走。

    nexus3-oss:安装和配置sonatype nexus3-oss的角色

    角色扮演:Nexus 3 OSS 该角色将安装并配置Nexus Repository Manager OSS版本3.x。 可以通过重新运行角色来更新所有配置,但与相关的设置除外,它们在关系中是不变的。目录注意:从ansible星系站点查看时,TOC链接将...

    nexus-3.25.0-03-win64_20200724.rar

    nexus-3.25.0-03最新版本,For Windows版本,一直以来最好用的maven管理服务器工具,现在已经管理的包括:npm、Nuget、Conan、Docker镜像中心、apt、Yum、R、PyPI、Go

    记一次 Centos 7 搭建 Nexus (Maven私服)

    3、提供安装包,使部署更简单(安装完自动添加成服务,省去手动添加的麻烦) 4、增加 Docker、NuGet、npm、Bower 的支持 5、提供新的管理接口,从而能自动管理任务。 搭建本地 Nexus 私有仓库有如下特点: 加速构建...

    在Centos上搭建Maven中央仓库的方法

    安装JAVA 在这里使用yum来安装java的jdk,可以使用指令yum search java | grep jdk来查看yum下提供了哪些jdk版本。这里选择1.8版本,安装指令为:sudo yum install java-1.8.0-openjd 安装完毕后还需要修改环境变量...

    nexus-2.12.0-01-bundle(已验证可用).zip

    nexus2私服服务器,支持windows和linux系统,直接解压后运行bin目录下的nexus(linux,centos等)/nexus.cmd(windows),亲测可用

    nexus-oss-webapp-1.9.2.4-bundle.tar.gz

    亲测,在centos下安装部署成功,可以使用

    nexus-3.9.0-01.zip

    搭建maven私服 安装环境:centos、macOs version:3.9.0-01 该资源已在mac、centos上试用 使用参考:https://blog.csdn.net/master336/article/details/103975829

    docker-nexus:Sonatype Nexus 的 Docker 镜像

    sonatype/docker-nexus 带有 OpenJDK 的 Sonatype Nexus Repository Manager 2 的 Docker 镜像,从 2.14.14 开始,用作基础镜像,而早期版本使用 CentOS。 对于 Nexus Repository Manager 3,请参考构建: # docker ...

    nexus-2.14.8-01-bundle.zip

    centos下,用于管理公司或团队自定义jar包的maven私服,解压即用,请用unzip命令解压

    nexus3搭建需要的jar包.zip

    Nexus3私服搭建教程,以及搭建中可能出现的问题部分解决方案。 搭建环境所需要的jar包版本包含 maven,jdk,nexus3

Global site tag (gtag.js) - Google Analytics