How to install Artifactory on Rocky Linux 9

Share on Social Media

Want to install Artifactory on Rocky Linux 9 like a pro? Discover this step-by-step guide to install, configure, and secure Artifactory effortlessly. Don’t miss out—optimize your DevOps pipeline before your competitors do! #centlinux #linux #devops


Table of Contents


Introduction

When managing software packages and artifacts in a DevOps or CI/CD environment, JFrog Artifactory is a game-changer. It’s a universal repository manager that acts like a central hub for all your binary files. If you’re using Rocky Linux 9, a robust and stable Linux distribution, you’re in luck—installing Artifactory is straightforward when you follow the right steps. This guide breaks everything down so that even if you’re not a Linux guru, you can get Artifactory up and running smoothly.


What Is Artifactory?

Think of Artifactory as a warehouse for your development team’s raw materials—binaries, libraries, Docker images, Helm charts, and more. It stores, manages, and distributes all your artifacts efficiently. Built by JFrog, it supports various technologies including Maven, Gradle, npm, Docker, and Python. Whether you’re running a monolithic app or a microservices architecture, Artifactory helps manage software components throughout the development lifecycle.

Artifactory offers advanced capabilities such as metadata indexing, checksum-based storage, and repository replication. That means faster builds, reduced network bandwidth, and seamless integration with build tools and CI servers like Jenkins and GitHub Actions.

In short, it’s not just a file storage solution—it’s a binary lifecycle management tool designed for enterprises and agile teams alike.

How to install Artifactory on Rocky Linux 9
How to install Artifactory on Rocky Linux 9

Why Choose Artifactory for Your DevOps Pipeline?

Speed, reliability, and consistency—those are the core reasons teams adopt Artifactory. In modern DevOps environments, where continuous integration and delivery pipelines are essential, Artifactory ensures that the exact version of a dependency is available when and where you need it.

Here’s what makes it powerful:

  • Universal support for all major package formats.
  • Smart caching of remote repositories to reduce external dependency failures.
  • Security and access control to protect sensitive artifacts.
  • High availability and scalability, especially with the enterprise version.

If you’ve ever had a build break due to a missing or updated dependency, you’ll appreciate Artifactory’s repository mirroring and snapshot capabilities. For organizations moving toward DevSecOps, Artifactory also integrates with vulnerability scanners and license compliance tools.

Recommended Training: DevOps Beginners to Advanced with Projects
Begin Your DevOps Career As a Newbie | AWS, Linux, Scripting, Jenkins, Ansible, GitOps, Docker, Kubernetes, & Terraform.

4039556 ebb3 9
show?id=oLRJ54lcVEg&bids=1597309

Prerequisites for JFrog Artifactory

System Requirements

Before diving into the installation, ensure your system meets the basic requirements. JFrog Artifactory is a resource-intensive application, especially when used at scale.

Here’s what JFrog recommends for the OSS version:

ComponentRecommended Minimum
CPU4 Cores
RAM4 GB (8 GB or more ideal)
Disk Space50 GB minimum
OSRocky Linux 9 (64-bit)
Java VersionOpenJDK 17+

Make sure to allocate enough disk space on /var/opt/jfrog/artifactory or another storage path, especially if you’re hosting a lot of Docker images or binary files.

Preparing the Environment

Start by accessing your Rocky Linux 9 machine via SSH or terminal. You need to have root privileges or be able to run sudo commands.

Log in to your server:

ssh user@your_server_ip

Switch to the root user or use sudo:

sudo -i

Ensure SELinux is configured properly or temporarily set to permissive mode if it causes issues. You can do this by editing the /etc/selinux/config file.

Optional – Disable SELinux temporarily (not recommended for production):

sudo setenforce 0

Updating System Packages

To avoid compatibility issues, make sure your system is fully updated. Run the following commands:

sudo dnf update -y
sudo dnf upgrade -y

Clean up the package manager’s cache to keep things tidy:

sudo dnf clean all

At this point, your system is ready for the next critical step—installing Java, a core dependency for Artifactory.


Installing Java on Rocky Linux 9

Why Java is Required for Artifactory

Artifactory is a Java-based application. That means it runs on the Java Virtual Machine (JVM), which provides platform-independent execution and memory management. Without Java, Artifactory simply won’t start.

Moreover, using an unsupported version of Java can result in crashes or performance degradation. For Artifactory 7.x and above, Java 17 (OpenJDK or Oracle JDK) is the recommended version.

Installing OpenJDK 17 on Rocky Linux 9

Rocky Linux uses dnf as its package manager, making the Java installation process simple.

Install OpenJDK 17:

sudo dnf install java-17-openjdk -y

Verify the installation:

java -version

You should see output similar to:

openjdk version "17.0.11" 2024-04-16
OpenJDK Runtime Environment (build 17.0.11+9)
OpenJDK 64-Bit Server VM (build 17.0.11+9, mixed mode)

If you’re managing multiple Java versions, use alternatives to set the default:

sudo alternatives --config java

Once Java is up and running, you’re all set to proceed with the installation of Artifactory itself.


Creating a Dedicated User for Artifactory

Why Should You Create a Separate User

Security 101: Never run applications as root unless absolutely necessary. Creating a separate user for Artifactory enhances system security and helps isolate the service from other system components.

This makes it easier to manage file permissions, configure SELinux/AppArmor, and monitor activity related to the Artifactory process.

Creating and Setting Permissions

Create the user and group:

sudo useradd -r -m -U -d /opt/jfrog -s /bin/bash artifactory

This command creates a system user artifactory with its home directory set to /opt/jfrog.

Set ownership on the installation directory (after install): You’ll need this step after downloading Artifactory. Here’s how it will look:

sudo chown -R artifactory:artifactory /opt/jfrog

This user will own and run the Artifactory service, keeping things tidy and secure. Up next, it’s time to grab the actual Artifactory package and install it.


Downloading and Installing JFrog Artifactory OSS

Choosing the Right Edition

JFrog offers several editions of Artifactory: OSS, Pro, Enterprise, and Enterprise+.

For this guide, we’re using the OSS edition—perfect for small teams or learning purposes. It supports most features you’d need for managing artifacts without the licensing cost.

Downloading the RPM Package

You can get the latest OSS RPM package directly from JFrog’s official site or use curl to download it:

curl -L -O https://releases.jfrog.io/artifactory/artifactory-rpms/artifactory-oss-latest.rpm

Alternatively, you can browse to https://jfrog.com/artifactory/ and download it manually if needed.

Read Also: How to install JFrog Artifactory on CentOS 7

Install Artifactory on Rocky Linux 9

Once downloaded, install it using dnf:

sudo dnf install artifactory-oss-latest.rpm -y

This will install Artifactory under /opt/jfrog/artifactory by default. After installation:

Enable the service:

sudo systemctl enable artifactory

Start the service:

sudo systemctl start artifactory

Check the status:

sudo systemctl status artifactory

Now you can access Artifactory at http://your_server_ip:8081/artifactory.


Configuring Artifactory After Installation

Initial Web UI Setup

Once Artifactory is installed and running, it’s time to dive into the web interface. Open a browser and go to:

http://<your-server-ip>:8081/artifactory

On your first login, Artifactory will guide you through the onboarding wizard. You’ll be asked to:

  1. Set an admin password – The default user is admin and the default password is also password. You’ll want to change that immediately for security.
  2. Configure a base URL – This is used in system notifications and links.
  3. Choose repositories to set up – Maven, npm, Docker, and more. You can skip or configure them later.
  4. Skip JFrog subscription for OSS users – The wizard will offer enterprise features; simply skip or decline them if you’re sticking with the free version.

This setup process ensures your Artifactory instance is uniquely identified and securely accessible by your team.

Basic Settings You Should Tweak

Here are a few things to fine-tune right after installation:

  • Change default ports if needed:
    Edit /opt/jfrog/artifactory/var/etc/system.yaml and look for the server.port setting if you want to use a different port.
  • Configure reverse proxy (optional):
    If you’re running a web server like Nginx or Apache, you might want to set up a reverse proxy for better security and performance.
  • Set up SSL certificates:
    Essential for secure transmission, especially in team environments. Configure your reverse proxy or use Artifactory’s built-in support for HTTPS with custom certs.

Managing Artifactory as a Systemd Service

How to Enable and Control Artifactory Service

Once installed, JFrog Artifactory runs as a systemd service, which makes managing it super easy. Let’s go over the main commands:

Start the service:

sudo systemctl start artifactory

Stop the service:

sudo systemctl stop artifactory

Restart the service:

sudo systemctl restart artifactory

Enable service on boot:

sudo systemctl enable artifactory

Check status:

sudo systemctl status artifactory

These commands help you troubleshoot and control Artifactory without having to dig deep into its process tree. Make sure to check logs located in /opt/jfrog/artifactory/var/log/ if something goes wrong.

Setting Up Auto-Restart and Resource Limits

To prevent JFrog Artifactory from crashing during system overloads or restarts, edit the systemd unit:

sudo systemctl edit artifactory

Add the following configuration:

[Service]
Restart=always
LimitNOFILE=65536

This ensures your service automatically restarts and has the right number of file descriptors for large builds.


Configuring Repositories in Artifactory

Types of Repositories in Artifactory

Artifactory supports three types of repositories:

  1. Local – Store your own internal packages.
  2. Remote – Proxy external repositories like Maven Central or npmjs.
  3. Virtual – Aggregate multiple repositories under a single URL.

Each has its use case. Local repos are great for hosting custom libraries or artifacts. Remote ones improve performance and availability by caching third-party packages. Virtual repositories simplify access by grouping multiple repos together.

Setting Up Your First Maven and npm Repositories

To set these up:

  1. Go to Admin > Repositories > Repositories.
  2. Click Create Repository and choose either Maven or npm.
  3. Set a name like libs-release-local or npm-remote.
  4. For remote repos, specify the URL (e.g., https://registry.npmjs.org/).
  5. Save and apply.

Now developers can point their pom.xml or package.json to your Artifactory URL instead of hitting the public internet—faster, safer, and more reliable.


Security and Access Control

Creating Users and Groups

Artifactory allows granular access control, which is crucial for teams of all sizes.

  1. Navigate to Admin > Identity and Access > Users.
  2. Click New User, set a username, email, and assign groups.
  3. You can also automate user creation via LDAP or SAML.

Groups make permission management easier. You can define roles (e.g., developers, admins, viewers) and assign them to groups instead of individual users.

Assigning Permissions to Repositories

  1. Go to Admin > Identity and Access > Permissions.
  2. Create a new permission target.
  3. Assign repositories and user/groups to it.
  4. Choose actions like read, deploy, delete, and annotate.

This ensures that, for example, only QA engineers can delete packages in a testing repo, while devs can deploy to dev repos.

Security is tight by default, but it’s best to audit access controls regularly to prevent unintentional exposure or privilege escalation.


Backing Up and Restoring Artifactory

How to Perform Backups

Backups are non-negotiable when you’re dealing with artifacts crucial to your build pipeline. Artifactory supports multiple backup strategies:

Manual backups:
Just tar the data and etc folders:

tar -czvf artifactory-backup.tar.gz /opt/jfrog/artifactory/var

Scheduled backups:
In the UI: Go to Admin > Services > Backup
Create a new backup plan, set the schedule, and storage path.

These can be local or remote, and JFrog Artifactory lets you set retention policies to prevent disk bloat.

Restoring from Backup

Restoration is as simple as placing your backup into the appropriate directory and restarting the service:

Stop the service:

sudo systemctl stop artifactory

Extract the backup:

tar -xzvf artifactory-backup.tar.gz -C /opt/jfrog/artifactory/var

Start the service again:

sudo systemctl start artifactory

Verify by logging into the UI. Your repositories, users, and configs should all be back.


Monitoring and Logging in Artifactory

Where to Find Logs and What to Monitor

Artifactory creates extensive logs that can help troubleshoot issues or analyze performance bottlenecks. The logs are stored in:

/opt/jfrog/artifactory/var/log/

Here’s a quick overview of important log files:

  • artifactory.log: Main application log.
  • access.log: Records access requests.
  • request.log: HTTP request details.
  • service.log: Tracks internal service activity.
  • replicator.log: Logs replication events.

You can monitor Artifactory’s health using its built-in health checks or integrate with Prometheus and Grafana for more advanced dashboards.

Using the Web UI for System Monitoring

Navigate to Admin > Monitoring in the UI to see:

  • System performance stats
  • Storage usage by repository
  • Garbage collection activity
  • Thread and memory usage

This data helps you make decisions about scaling or optimizing your JFrog Artifactory setup.


Integrating Artifactory with CI/CD Tools

Supported Build Tools and CI Servers

Artifactory plays nicely with a wide variety of CI/CD tools:

  • Jenkins
  • GitLab CI/CD
  • GitHub Actions
  • Bamboo
  • TeamCity
  • Azure DevOps

Build tools like Maven, Gradle, and npm can upload and download artifacts directly from Artifactory.

Example: Integrating with Jenkins

  1. Install the JFrog Artifactory Plugin from Jenkins plugin manager.
  2. Configure Artifactory server details in Jenkins under Manage Jenkins > Configure System.
  3. In your Jenkinsfile or freestyle project, use Artifactory steps to resolve or deploy artifacts.

This allows you to:

  • Resolve dependencies from Artifactory
  • Upload build artifacts to a local repo
  • Track builds using build info metadata

Integration tightens your release process and makes rollbacks and auditing much easier.


Setting Up HTTPS for Secure Access

Why HTTPS Matters

Running Artifactory over plain HTTP is not recommended—especially in production. HTTPS encrypts traffic and secures credentials and tokens from being intercepted.

You can either configure SSL directly in Artifactory or use a reverse proxy like Nginx.

Using Nginx as a Reverse Proxy with SSL

Install Nginx:

sudo dnf install nginx -y

Obtain SSL certificates (e.g., via Let’s Encrypt or from your CA).

Create a configuration file in /etc/nginx/conf.d/artifactory.conf:

server {
    listen 443 ssl;
    server_name yourdomain.com;

    ssl_certificate /etc/ssl/certs/your_cert.crt;
    ssl_certificate_key /etc/ssl/private/your_key.key;

    location / {
        proxy_pass http://localhost:8081/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Restart Nginx:

sudo systemctl restart nginx

Now you can access Artifactory securely via https://yourdomain.com.


Troubleshooting Common Installation Issues

Artifactory Not Starting

If the service fails to start, check the logs:

sudo journalctl -u artifactory

Look for Java errors, port conflicts, or file permission issues. Often, it’s a simple problem like Java not being installed or an incorrect config in system.yaml.

Web Interface Not Loading

Check if port 8081 is open:

sudo firewall-cmd --permanent --add-port=8081/tcp
sudo firewall-cmd --reload

Also verify that your server IP is correctly resolving and not being blocked by SELinux or firewalld.

Database Connection Errors

Though the default OSS version uses a file-based database, enterprise users often connect to MySQL or PostgreSQL. Misconfigured DB URLs or wrong credentials can prevent Artifactory from starting. Always check your system.yaml.


Best Practices for Using Artifactory in Production

Storage Optimization

Artifacts can quickly consume disk space. Set up retention policies, use checksum-based deduplication, and regularly clean unused artifacts.

  • Enable garbage collection
  • Compress files
  • Archive old repositories

High Availability and Clustering

If you have a large team or need uptime guarantees, consider clustering Artifactory nodes and placing them behind a load balancer. This also allows zero-downtime upgrades.

Automate Everything

Leverage REST APIs or JFrog CLI to:

  • Create repositories
  • Upload/download artifacts
  • Manage users
  • Monitor performance

Automation helps enforce consistency and saves time.


Frequently Asked Questions (FAQs)

Q1: Can I install Artifactory on a VPS with 2 GB RAM?
A1: Technically yes, but it’s not recommended. Artifactory performs best with at least 4 GB of RAM and may crash or run slowly with less.

Q2: Is it safe to expose Artifactory directly over the internet?
A2: Not without SSL and proper access control. Always use HTTPS and limit access via firewalls or VPNs.

Q3: Can I use MySQL instead of the default database?
A3: Yes, but you’ll need to edit the system.yaml file and configure the JDBC URL and credentials manually.

Q4: Does Artifactory OSS support Docker repositories?
A4: Absolutely! Artifactory OSS supports Docker, Maven, npm, and more.

Q5: How often should I back up Artifactory?
A5: Ideally, daily. But it depends on how often artifacts are uploaded. Always back up before major upgrades.


Conclusion

Install Artifactory on Rocky Linux 9: it is a solid move for any team looking to gain control over artifact management and optimize their CI/CD pipeline. With its powerful features, universal repository support, and seamless integrations, Artifactory becomes more than just a tool—it becomes an essential part of your DevOps culture.

From setting up Java, configuring repositories, enabling security, to integrating with Jenkins and setting up SSL, this guide covered every key step. Whether you’re managing internal libraries or caching third-party dependencies, Artifactory on Rocky Linux 9 offers a reliable, scalable, and secure solution.

Make sure to follow best practices, set up monitoring, and keep your system updated to make the most of what Artifactory has to offer. Once it’s up and running, you’ll wonder how your team ever managed without it.

From setting up scalable AWS solutions to managing complex Linux environments, I’ve got you covered. Visit my Fiverr profile to get started.


Looking for something?

Leave a Reply