码迷,mamicode.com
首页 > 其他好文 > 详细

[Nexus3]本地YUM源私有仓

时间:2020-02-24 09:24:00      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:repos   dock   ===   imu   密码   volume   管理   本地   bootstra   

硬件安装环境

官方文档(英)

CPU

Performance is primarily bounded by IO (disk and network) rather than CPU. Available CPUs will impact longer running operations and also the thread allocation algorithms of the web container.
Minimum CPUs: 4 最少4Core
Recommended CPUs: 8+

Memory

  • small, personal
    repositories < 20
    total blobstore size < 20GB
    single repository format type
    8GB minimum

Docker部署

-----拉取镜像-------------------------
[root@Nexus3 ~]# docker image pull sonatype/nexus3
Using default tag: latest
Trying to pull repository docker.io/sonatype/nexus3 ... 
latest: Pulling from docker.io/sonatype/nexus3
c65691897a4d: Pull complete 
641d7cc5cbc4: Pull complete 
c508b13320cd: Pull complete 
79e3bf9d3132: Downloading [============================>                      ] 119.7 MB/212.2 MB
Digest: sha256:2c33632ccd8f8c5f9023a3d7f5f541e271833e402219f8c5a83a29d1721457ca
Status: Downloaded newer image for docker.io/sonatype/nexus3:latest
-----查看镜像-------------------------
[root@Nexus3 ~]# docker image ls
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
docker.io/sonatype/nexus3   latest              8eb898be2a53        8 weeks ago         611 MB

创建数据存放路径

[root@Nexus3 ~]# docker volume create --name nexus-data
nexus-data
-----查看卷-------------------------
[root@Nexus3 ~]# docker volume ls   
DRIVER              VOLUME NAME
local               nexus-data

启动容器

-d 后台运行 --name 容器名称 --restart 自启动 -p 服务器端口:容器端口 -v 本地目录:容器目录

docker run -d --name nexus3 --restart=always -p 8081:8081 -v nexus-data:/nexus-data sonatype/nexus3

查看日志

  • docker logs
[root@Nexus3 ~]# docker logs nexus3
2020-02-24 00:50:52,757+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@2d84aa07{HTTP/1.1,[http/1.1]}{0.0.0.0:8081}
2020-02-24 00:50:52,758+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - Started @51294ms
2020-02-24 00:50:52,758+0000 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer -
-------------------------------------------------
Started Sonatype Nexus OSS 3.21.1-01
-------------------------------------------------

admin密码

[root@Nexus3 nexus-data]# cat /var/lib/docker/volumes/nexus-data/_data/admin.password
f64b1308-be1c-40d9-95a6-2600caaa1290

8081可以登录了

http://10.1.44.16:8081

  • 登录
    技术图片

  • 初始化服务器
    技术图片

  • 重置管理员密码
    技术图片

  • 依据自己情况是否需要开启匿名访问
    技术图片

技术图片

END

[Nexus3]本地YUM源私有仓

标签:repos   dock   ===   imu   密码   volume   管理   本地   bootstra   

原文地址:https://www.cnblogs.com/leoshi/p/12355487.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!