1、下载 软件,本案例安装的是 jfrog-artifactory-oss-7.59.11-linux.tar.gz
https://releases.jfrog.io/artifactory/bintray-artifactory/org/artifactory/oss/jfrog-artifactory-oss/
2、解压下载下来的压缩包
tar zxf jfrog-artifactory-oss-7.59.11-linux.tar.gz
解压出来的是文件夹 artifactory-oss-7.59.11
3、修改配置,连接 postgresql数据库
注意:数据库一定要用干净的新建的数据库,否则启动服务会报错!
从 /home/zengyanhui/jfrog/artifactory/artifactory-oss-7.59.11/var/etc 目录下将 system.basic-template.yaml 复制到新文件 system.yaml
cp system.basic-template.yaml system.yaml
修改 /home/zengyanhui/jfrog/artifactory/artifactory-oss-7.59.11/var/etc/system.yaml文件,添加 以下内容:
## Database Configuration
database:
## To run Artifactory with any database other than PostgreSQL allowNonPostgresql set to true.
#allowNonPostgresql: false
## One of mysql, oracle, mssql, postgresql, mariadb
## Default Embedded derby
## Example for postgresql
type: postgresql
driver: org.postgresql.Driver
url: "jdbc:postgresql://192.168.0.107:30432/jfrog"
username: jfrog
password: jfrog
/home/zengyanhui/jfrog/artifactory/artifactory-oss-7.59.11/var/etc/system.yaml 完整内容如下:
## @formatter:off
## JFROG ARTIFACTORY SYSTEM CONFIGURATION FILE
## HOW TO USE: comment-out any field and keep the correct yaml indentation by deleting only the leading '#' character.
configVersion: 1
## NOTE: JFROG_HOME is a place holder for the JFrog root directory containing the deployed product, the home directory for all JFrog products.
## Replace JFROG_HOME with the real path! For example, in RPM install, JFROG_HOME=/opt/jfrog
## NOTE: Sensitive information such as passwords and join key are encrypted on first read.
## NOTE: The provided commented key and value is the default.
## SHARED CONFIGURATIONS
## A shared section for keys across all services in this config
shared:
## Java 17 distribution to use
#javaHome: "JFROG_HOME/artifactory/app/third-party/java"
## Extra Java options to pass to the JVM. These values add to or override the defaults.
#extraJavaOpts: "-Xms512m -Xmx2g"
## Security Configuration
security:
## Join key value for joining the cluster (takes precedence over 'joinKeyFile')
#joinKey: "<Your joinKey>"
## Join key file location
#joinKeyFile: "<For example: JFROG_HOME/artifactory/var/etc/security/join.key>"
## Master key file location
## Generated by the product on first startup if not provided
#masterKeyFile: "<For example: JFROG_HOME/artifactory/var/etc/security/master.key>"
## Maximum time to wait for key files (master.key and join.key)
#bootstrapKeysReadTimeoutSecs: 120
## Node Settings
node:
## A unique id to identify this node.
## Default auto generated at startup.
#id: "art1"
## Default auto resolved by startup script
#ip:
## Sets this node as primary in HA installation
#primary: true
## Sets this node as part of HA installation
#haEnabled: true
## Database Configuration
database:
## To run Artifactory with any database other than PostgreSQL allowNonPostgresql set to true.
#allowNonPostgresql: false
## One of mysql, oracle, mssql, postgresql, mariadb
## Default Embedded derby
## Example for postgresql
type: postgresql
driver: org.postgresql.Driver
url: "jdbc:postgresql://192.168.0.107:30432/jfrog"
username: jfrog
password: jfrog
4、启动服务
./artifactory.sh start &
启动日志显示 Tomcat started. 则启动成功。