Looking to install JFrog Artifactory on Ubuntu 22.04?
Then this guide is for you.
JFrog Artifactory is a universal repository manager that allows frictionless, unified management of your software supply chain artifacts, binaries, packages, files, containers, and components. Artifactory supports the widest range of tools, packages, and deployment environments, making it an accelerated and secure DevOps solution.
This tutorial will cover the step-by-step process of installing JFrog Artifactory on your Ubuntu system.
Let’s get started!
What You’ll Need
Before we dive into the tutorial, it’s vital to ensure that you meet the necessary prerequisites to install Artifactory.
Here’s what you’ll need:
- A system running Ubuntu (version 22.04 or later)
- Docker Engine (guide)
- A web browser to run the app locally.
- 4 CPU, 4 GB Memory, External Ports: 8081, 8082
How to Install JFrog Artifactory on Ubuntu 22.04: Step-By-Step
Once you have the necessary requirements for installing Artifactory in place, we can dive into the steps.
Step 1: Install Docker Engine
Docker is a software platform that enables rapid software deployment. It does so by using OS-level virtualization and delivering software as ‘containers’. We will use Docker for this tutorial due to the ease of deployment and scalability. Additionally, it’s one of the recommended ways to install Artifactory.
- First, to keep your software package cache list up to date, update your system with this command:
$ sudo apt update
- When the update is done, you must install some prerequisite packages used for Docker and interacting with the web. Install all of them by running this command:
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
- Next, we need to import the GPG key for Docker. The GPG key helps in establishing trust by allowing us to verify the integrity and origin of the packages that are installed. You can import the GPG key with the below command:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg
- With the GPG key successfully imported, add Docker’s stable repository to your local software repository so that we can install Docker from it. Do that with this command:
$ sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- To make the changes take effect, update your repository list once more with this command:
$ sudo apt update
- Now install Docker using this command:
$ sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
- After installing Docker, you need to add the current user to the Docker group so that even as a non-root user, you can run Docker operations. Include your current user in the docker group using these commands:
$ sudo usermod -aG docker $USER
$ newgrp docker
- Restart your device to make the changes take effect.
Step 2: Download the JFrog Artifactory Docker image
Now that you have Docker installed, you need to get the Artifactory Docker image. Think of Docker images as files that contain a set of instructions to execute code in a Docker Container.
- Get the Docker images with these commands:
$ docker pull docker.bintray.io/jfrog/artifactory-oss:latest
# For CE edition
$ docker pull docker.bintray.io/jfrog/artifactory-cpp-ce
- To confirm if the pulls were successful, check your current image list with this command:
$ docker images
As you can see from the above screenshot, we have both Artifactory images (you can ignore the other images on the list).
Step 3: Create a Data Directory
- To keep everything organized and persistent, we will create some directories in the host system. Create the directories and change their ownership with these commands:
$ sudo mkdir -p /jfrog/artifactory
$ sudo chown -R 1030 /jfrog/
Step 4: Start the JFrog Artifactory Container
Now you have the necessary Docker images of JFrog Artifactory. It’s time to start the created container.
- Run the Artifactory Container with this command:
$ docker run -d --name artifactory -p 8082:8082 -p 8081:8081 -v artifactory-data:/var/opt/jfrog/artifactory releases-docker.jfrog.io/jfrog/artifactory-pro:latest
- After running the container, you can check its status using the following command:
$ docker ps
As you can see from the screenshot, the container was successfully created and is now running.
Step 5: Access Artifactory Web Interface
We’ve successfully run the Artifactory container. Now you can access it using any web browser. We will use ports 8081 and 8082 on the localhost to run the container.
- To access the Artifactory web interface, open your web browser and paste any of these into the search bar:
https://localhost:8081
OR
http://localhost:8082
If everything went well, then you should be welcomed by the JFrog login page, as seen in the below screenshot:
- If you already have an account with JFrog, then log in using your credentials. If not, you can start a 14-day free trial with them.
- To register, you can use your Google account or GitHub account. Alternatively, you can manually enter your email, first name, and last name. When you’ve filled out the form, press the Proceed button.
- You can either choose from the ‘Cloud’ route or the ‘Self-Hosted’ route. For the purposes of this guide, we will select Self-Hosted. Enter your company name and phone number(optional). Then click the Try it Now button.
- They will send a congratulatory email to you saying that your trial has started successfully. The email will contain the username, password, and license key for JFrog Artifactory. Save the credentials somewhere for future use.
- Now come back to the JFrog web interface on your browser. Fill in the username and password fields using the credentials you received in the email. Then press the Login button.
- You will receive a welcome message from JFrog that looks like the below screenshot. Click on the Get Started button to proceed.
Step 6: Configure JFrog Artifactory
In this last step, we’re going to configure Artifactory. After pressing the Get Started button, you will be walked through a setup wizard.
- First, reset the login password. Enter a new password and retype it. Then press the Next button.
- Now copy and paste the license key from the email you received from JFrog earlier. Then press the Next button.
- After that, set a base URL that you will use to access JFrog Artifactory. We will skip this one.
- The next step is about configuring your default proxy server. The proxy server is used so you can access all remote resources in the Platform Deployment. We will skip this as well.
- Lastly, choose the packages you want to create repositories for. You can choose one or multiple packages from here. Once you choose some packages, click Next to proceed. Should you not require any, you may choose to skip this step.
- Finish the setup wizard by pressing the Finish button.
- We will be taken to the admin dashboard. From here, you can start customizing Artifactory and other JFrog services.
Congratulations! You have successfully installed and configured JFrog Artifactory on your Ubuntu machine. This tutorial provided a comprehensive and detailed guide on installing JFrog Artifactory on Ubuntu 22.04 using Docker, including the registration process.
Additionally, we covered the setup of package repositories in JFrog Artifactory, allowing you to efficiently manage your software artifacts.
If this guide helped you, please share it.