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.
Bashyum update -yJava Runtime: Artifactory is a Java-based application and requires JDK 21.
Bashdnf 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 --nowAccess Control: Edit
/var/lib/pgsql/17/data/pg_hba.confto allow Artifactory to connect. Change the local connection method fromidentorpeertomd5(ortrustfor initial testing).Database Provisioning: Create a dedicated database and user for Artifactory.
SQLCREATE 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.
Bashcurl -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.
Bashyum 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).
Bashmkdir -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/securityDatabase Linking: Configure the
system.yamlfile to tell Artifactory to use PostgreSQL instead of the default Derby database.Thesystem.yamlfile is the primary configuration file for all Artifactory services. You must explicitly define the connection string to the external database.YAMLshared: 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).
Bashsystemctl stop firewalld && systemctl disable firewalldStartup: Start the Artifactory service and monitor the console logs for a "Ready" state.
Bashsystemctl start artifactory.service tail -f /opt/jfrog/artifactory/var/log/console.logDashboard Access: Navigate to
http://<SERVER_IP>:8082.Login:
adminPassword:
password(You will be prompted to change this immediately).
No comments:
Post a Comment