Friday, 17 April 2026

JFrog Artifactory - How to install


JFrog Artifactory OSS Installation Guide

CentOS 9 + PostgreSQL 17

This guide provides a structured workflow to install JFrog Artifactory OSS using PostgreSQL as an external database. This setup is preferred for production-like environments because it offers better performance and reliability than the default embedded database.


1. System Preparation

Before installing the application, ensure the host environment meets the software requirements.

  • Update System: Refresh repository metadata and installed packages.

    Bash
    yum update -y
    
  • Java Runtime: Artifactory is a Java-based application and requires JDK 21.

    Bash
    dnf install -y java-21-openjdk java-21-openjdk-devel
    java -version

2. External Database Setup (PostgreSQL 17)

Using an external database ensures that your artifact metadata is stored robustly.

  • Initialization: Here we use a postgres database to store the metadata. After installing the PostgreSQL server, initialize the data directory and enable the service.

    Bash
    /usr/pgsql-17/bin/postgresql-17-setup initdb
    systemctl enable postgresql-17 --now
    
  • Access Control: Edit /var/lib/pgsql/17/data/pg_hba.conf to allow Artifactory to connect. Change the local connection method from ident or peer to md5 (or trust for initial testing).

  • Database Provisioning: Create a dedicated database and user for Artifactory.

    SQL
    CREATE USER artifactory WITH PASSWORD 'your_password';
    CREATE DATABASE artifactory WITH OWNER artifactory;
    GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;

3. JFrog Artifactory Installation

  • Repository Configuration: Download the official JFrog RPM repository definition and move it to the system’s repo directory.

    Bash
    curl -L https://bintray.com/jfrog/artifactory-rpms/rpm -o jfrog-artifactory-rpms.repo
    mv jfrog-artifactory-rpms.repo /etc/yum.repos.d/
    
  • Package Installation: Install the Open Source (OSS) version.

    Bash
    yum install jfrog-artifactory-oss -y

4. Security & Connectivity Configuration

  • Encryption (Master Key): Artifactory requires a unique 16-bit hex key to encrypt sensitive system data (like database passwords).

    Bash
    mkdir -p $JFROG_HOME/artifactory/var/etc/security
    openssl rand -hex 16 > $JFROG_HOME/artifactory/var/etc/security/master.key
    chown -R artifactory: /opt/jfrog/artifactory/var/etc/security
    
  • Database Linking: Configure the system.yaml file to tell Artifactory to use PostgreSQL instead of the default Derby database.The system.yaml file is the primary configuration file for all Artifactory services. You must explicitly define the connection string to the external database.

    YAML
    shared:
      database:
        type: postgresql
        driver: org.postgresql.Driver
        url: "jdbc:postgresql://localhost:5432/artifactory"
        username: artifactory
        password: your_password
    

5. Service Launch & Verification

  • Network Access: Disable the firewall or open ports 8081 (Artifact data) and 8082 (UI/Router).

    Bash
    systemctl stop firewalld && systemctl disable firewalld
    
  • Startup: Start the Artifactory service and monitor the console logs for a "Ready" state.

    Bash
    systemctl start artifactory.service
    tail -f /opt/jfrog/artifactory/var/log/console.log
    
  • Dashboard Access: Navigate to http://<SERVER_IP>:8082.

    • Login: admin

    • Password: password (You will be prompted to change this immediately).


No comments:

Post a Comment

JFrog Artifactory - How to install

JFrog Artifactory OSS Installation Guide CentOS 9 + PostgreSQL 17 This guide provides a structured workflow to install JFrog Artifactory OSS...