自学内容网 自学内容网

jfrog artifactory oss社区版,不支持php composer私库

一、docker安装

安装环境:centos操作系统,root用户。

如果是mac或ubuntu等操作系统的话,会有许多安装的坑等着你。

一切都是徒劳,安装折腾那么久,最后还是不能使用。这就是写本文的初衷,切勿入坑就对了。

version: "3.3"
services:
  artifactory-service:
    image: docker.bintray.io/jfrog/artifactory-oss:7.49.6
    container_name: artifactory
    restart: always
    networks:
      - ci_net
    ports:
      - 8089:8081
      - 8090:8082
    volumes:
      - artifactory:/var/opt/jfrog/artifactory

volumes:
  artifactory:
networks:
  ci_net:

在这里插入图片描述

二、设置向导

  • 登录地址: http://192.168.5.6:8090/ui/login
  • 初始用户名和密码是: admin / password
    在这里插入图片描述

在首次使用的向导中,会让我们设置一个更为安全的密码。

最后就是使用了。

三、社区版的坑

jfrog artifactory oss社区版,不支持composer/npm等私库,远不如nexus好。

建议看到这里的朋友,就不要入坑jfrog artifactory了。

当然pro企业版是支持的啦,目的就是一个收费。

于是,大多数中小企业只能割舍它了。

在这里插入图片描述

附录、mac和ubuntu系统安装踩坑记录

1、读取目录的权限不足

Preparing to run Artifactory in Docker


Running as uid=1030(artifactory) gid=1030(artifactory) groups=1030(artifactory)


Dockerfile for this image can found inside the container.


To view the Dockerfile: 'cat /docker/artifactory-oss/Dockerfile.artifactory'.


Copying Artifactory bootstrap files


2024-11-04T03:49:03.677Z [shell] [INFO ] [] [installerCommon.sh:3568       ] [main] - Mapping value from deprecated key EXTRA_JAVA_OPTIONS to new key JF_SHARED_EXTRAJAVAOPTS


2024-11-04T03:49:04.163Z [shell] [INFO ] [] [installerCommon.sh:1632       ] [main] - Checking open files and processes limits


2024-11-04T03:49:04.183Z [shell] [INFO ] [] [installerCommon.sh:1635       ] [main] - Current max open files is 1048576


2024-11-04T03:49:04.205Z [shell] [INFO ] [] [installerCommon.sh:1646       ] [main] - Current max open processes is unlimited


[WARN ] Error while initializing File resolver : Config file does not exists : /opt/jfrog/artifactory/var/etc/system.yaml



Database connection check failed Could not determine database type


2024-11-04T03:49:04.280Z [shell] [INFO ] [] [installerCommon.sh:1715       ] [main] - Testing directory /opt/jfrog/artifactory/var has read/write permissions for user id 1030


/opt/jfrog/artifactory/app/bin/installerCommon.sh: line 1685: /opt/jfrog/artifactory/var/test-permissions: Permission denied


2024-11-04T03:49:04.305Z [shell] [INFO ] [] [installerCommon.sh:1723       ] [main] - ###########################################################


2024-11-04T03:49:04.325Z [shell] [INFO ] [] [installerCommon.sh:1724       ] [main] - /opt/jfrog/artifactory/var DOES NOT have proper permissions for user id 1030


2024-11-04T03:49:04.345Z [shell] [INFO ] [] [installerCommon.sh:1725       ] [main] - Directory: /opt/jfrog/artifactory/var, permissions: 775, owner: UNKNOWN, group: UNKNOWN


2024-11-04T03:49:04.366Z [shell] [INFO ] [] [installerCommon.sh:1726       ] [main] - Mounted directory must have read/write permissions for user id 1030


2024-11-04T03:49:04.387Z [shell] [INFO ] [] [installerCommon.sh:1727       ] [main] - ###########################################################


2024-11-04T03:49:04.410Z [shell] [ERROR] [] [installerCommon.sh:812        ] [main] - Directory /opt/jfrog/artifactory/var has bad permissions for user id 1030

2、Master key is missing

2024-11-04T06:53:48.319Z [jfrou] [INFO ] [1c216118873c8e06] [security_keys.go:172          ] [main                ] [] - Master key is missing. Pending for 110 seconds with 5m0s timeout


2024-11-04T06:53:48.503Z [jfmd ] [INFO ] [                ] [security_keys.go:172          ] [main                ] - Master key is missing. Pending for 110 seconds with 2m0s timeout [init]


2024-11-04T06:53:48.665Z [jfevt] [INFO ] [724d295281f930a5] [security_keys.go:172          ] [main                ] [                ] - Master key is missing. Pending for 110 seconds with 2m0s timeout [startup]


2024-11-04T06:53:49.124Z [jfob ] [INFO ] [6fd11037508f616d] [security_keys.go:172          ] [main                ] - Master key is missing. Pending for 110 seconds with 2m0s timeout [startup]


2024-11-04T06:53:49.800Z [jffe ] [INFO ] [] [frontend-service.log] [main                ] - pinging artifactory, attempt number 110


2024-11-04T06:53:49.803Z [jffe ] [INFO ] [] [frontend-service.log] [main                ] - pinging artifactory attempt number 110 failed with code : ECONNREFUSED

3、join.key不存在

2024-11-05T02:53:38.183Z [jfmd ] [ERROR] [                ] [keys.go:23                    ] [main                ] - Cluster join: Failed resolving join key: failed resolving 'shared.security.joinKey' key; file does not exist: /opt/jfrog/artifactory/var/etc/security/join.key,
goroutine 1 [running]:,
runtime/debug.Stack(),
/src/runtime/debug/stack.go:24 +0x5e,
jfrog.com/jfrog-go-commons/v7/pkg/log.(*standardLogger).Panicfc(0xc000ae0900, {0x2d7b978, 0xc0009ebe90}, {0xc000740000, 0x9e}, {0x0, 0x0, 0x0}),
goroot/pkg/mod/jfrog.com/jfrog-go-commons/v7@v7.120.0/pkg/log/standard_logger.go:98 +0xc5,
jfrog.com/metadata/v7/services/common.MustResolveSecurityKeys({0x2d7b978, 0xc0009ebe90}, {0x2d835e8, 0xc0009c0d70}, {0x2d901e8, 0xc000ae0900}),
jfrog.com/metadata/v7@v7.90.0/services/common/keys.go:23 +0x1c6,
main.main(),
jfrog.com/metadata/v7@v7.90.0/metadata.go:35 +0x2ec,
 [init],
panic: Cluster join: Failed resolving join key: failed resolving 'shared.security.joinKey' key; file does not exist: /opt/jfrog/artifactory/var/etc/security/join.key,
goroutine 1 [running]:,
runtime/debug.Stack(),
/src/runtime/debug/stack.go:24 +0x5e,
jfrog.com/jfrog-go-commons/v7/pkg/log.(*standardLogger).Panicfc(0xc000ae0900, {0x2d7b978, 0xc0009ebe90}, {0xc000740000, 0x9e}, {0x0, 0x0, 0x0}),
goroot/pkg/mod/jfrog.com/jfrog-go-commons/v7@v7.120.0/pkg/log/standard_logger.go:98 +0xc5,
jfrog.com/metadata/v7/services/common.MustResolveSecurityKeys({0x2d7b978, 0xc0009ebe90}, {0x2d835e8, 0xc0009c0d70}, {0x2d901e8, 0xc000ae0900}),
jfrog.com/metadata/v7@v7.90.0/services/common/keys.go:23 +0x1c6,
main.main(),
jfrog.com/metadata/v7@v7.90.0/metadata.go:35 +0x2ec,
,
,
goroutine 1 [running]:,
jfrog.com/jfrog-go-commons/v7/pkg/log.defaultEventFactory.(*Logger).Panic.func1({0xc00003a600?, 0x0?}),
goroot/pkg/mod/github.com/rs/zerolog@v1.33.0/log.go:405 +0x27,
github.com/rs/zerolog.(*Event).msg(0xc000b0e000, {0xc00003a600, 0x2ee}),
goroot/pkg/mod/github.com/rs/zerolog@v1.33.0/event.go:158 +0x2b9,
github.com/rs/zerolog.(*Event).Msgf(0xc000b0e000, {0xc00086c2c0?, 0x4316440?}, {0xc000a43ce8?, 0x4319d00?, 0x3?}),
goroot/pkg/mod/github.com/rs/zerolog@v1.33.0/event.go:131 +0x46,
jfrog.com/jfrog-go-commons/v7/pkg/log.(*standardLogger).logMessage(0xc000ae0900, {0x2d7b978, 0xc0009ebe90}, 0x5, {0xc00086c2c0, 0xa1}, {0xc000a43ce8, 0x1, 0x1}),
goroot/pkg/mod/jfrog.com/jfrog-go-commons/v7@v7.120.0/pkg/log/standard_logger.go:127 +0x2b8,
jfrog.com/jfrog-go-commons/v7/pkg/log.(*standardLogger).Panicfc(0xc000ae0900, {0x2d7b978, 0xc0009ebe90}, {0xc000740000, 0x9e}, {0x0, 0x0, 0x0}),
goroot/pkg/mod/jfrog.com/jfrog-go-commons/v7@v7.120.0/pkg/log/standard_logger.go:99 +0x1c5,
jfrog.com/metadata/v7/services/common.MustResolveSecurityKeys({0x2d7b978, 0xc0009ebe90}, {0x2d835e8, 0xc0009c0d70}, {0x2d901e8, 0xc000ae0900}),
jfrog.com/metadata/v7@v7.90.0/services/common/keys.go:23 +0x1c6,
main.main(),
jfrog.com/metadata/v7@v7.90.0/metadata.go:35 +0x2ec,
2024-11-05T02:53:38.229Z [jfevt] [FATAL] [4a76e1fc9995d6af] [bootstrap.go:161              ] [main                ] [                ] - Cluster join: Failed resolving join key: failed resolving 'shared.security.joinKey' key; file does not exist: /opt/jfrog/artifactory/var/etc/security/join.key [startup],

原文地址:https://blog.csdn.net/zhuganlai168/article/details/143507982

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!