External Postgres setup:

ARTIFACTORY: Installation Quick Start Guide - Linux Archive

AuthorFullName__c
Lawrence Fung
articleNumber
000005197
ft:sourceType
Salesforce
FirstPublishedDate
2022-01-13T19:27:31Z
lastModifiedDate
2022-01-13
VersionNumber
15

1. Logged into the DB, run:

CREATE USER artifactory WITH PASSWORD 'password';
CREATE DATABASE artifactory WITH OWNER=artifactory ENCODING='UTF8';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;

2. Download the JDBC driver corresponding to your PostgreSQL version from the PostgreSQL JDBC Driver Download site and copy the downloaded jar file into the following directory:

$JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib 

Make sure your driver has read permissions for all users. Note that this directory will get created on unzipping of the linux archive, or you may pre-create it.

3. Adjust the database connection details in the system.yaml configuration file (more below): 

shared:
  database:
    type: postgresql
    driver: org.postgresql.Driver
    url: jdbc:postgresql://<your db url, for example: localhost:5432>/artifactory
    username: artifactory
    password: password

Make sure to keep your YAML spacing consistent! We recommend either 2 or 4 spaces indentation, but ensure that it is consistent throughout.

4. Enabling PostgreSQL connectivity from the Artifactory servers:
Add the following line to: 

<postgres_mount>/data/pg_hba.conf.
host  artifactory       artifactory     <artifactory_ip> md5

Add the following line to (if it already exists, update it)

<postgres_mount>/data/postgresql.conf    
listen_addresses='*'

We recommend having sizable storage space for the database, even if it is only storing metadata. It should be at least 2/10 of your expected file store size. 

Artifactory supports a number of DB types, including mysql, oracle, mariaDB. You may find the links to other supported databases below in the glossary.

For more database recommendations, see https://jfrog.com/whitepaper/best-practices-for-managing-your-artifactory-database/