HOW TO INSTALL JFROG ARTIFACTORY ON UBUNTU 22.O4

What is JFrog Artifactory?

Artifactory is a universal DevOps solution for hosting, managing, and distributing binaries and artifacts. Any type of software in binary form – such as application installers, container images, libraries, configuration files, etc. – can be curated, secured, stored, and delivered using Artifactory.

The name “Artifactory” reflects the fact that it can host any type of “artifact” needed in your software development “factory.” In software development, an artifact is any object produced during the software development and delivery process. Artifacts include the files used to install and run applications, as well as any complementary information necessary to configure or manage software.

Artifactory serves as the central hub for your DevOps processes. All artifacts, dependencies, packages, etc. ultimately get put into and pulled from Artifactory.

INSTALLATION

To launch an Ubuntu instance with a t2.medium instance type on AWS, follow these condensed steps:

1. Login to AWS Management Console and navigate to the EC2 Dashboard.

2. Click “Launch Instance”, then select an Ubuntu Server AMI from the list.

3. Choose “t2.medium” as the instance type and click “Next: Configure Instance Details”.

4. Configure instance details as needed, then click through “Add Storage”, “Add Tags”, and “Configure Security Group” with your desired settings or defaults.

5. Review your settings and click “Launch” to create your Ubuntu instance.

INSTALL JAVA

Connect to Your server using Mobaxterm or Terminal

sudo apt-get update

Install java on the server

sudo apt install fontconfig openjdk-17-jre -y
java --version

Fetch and add the JFrog public GPG key

wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -

NOTE 👍

If you not see OK after running This command, That means Jfrog Changed key so
Don’t say this guide as waste

Determine your distribution

DISTRO=$(lsb_release -cs)

Add JFrog Artifactory repository to sources.list

echo "deb https://releases.jfrog.io/artifactory/artifactory-debs ${DISTRO} main" | sudo tee -a /etc/apt/sources.list

Update package lists

sudo apt-get update

Install JFrog Artifactory C++ CE

sudo apt-get install jfrog-artifactory-cpp-ce -y

Clear Explination of above Script/ Complete script

#!/bin/bash
sudo apt update
# Fetch and add the JFrog public GPG key
wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -

# Determine your distribution


# Add JFrog Artifactory repository to sources.list
echo "deb https://releases.jfrog.io/artifactory/artifactory-debs ${DISTRO} main" | sudo tee -a /etc/apt/sources.list

# Update package lists
sudo apt-get update

# Install JFrog Artifactory C++ CE
sudo apt-get install jfrog-artifactory-cpp-ce -y

Sure, let’s break down the script and explain each command:

1. wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -

wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols.
-q turns off wget’s output, making the operation “quiet”.
O - directs wget to write the downloaded file to standard output.
https://releases.jfrog.io/artifactory/api/gpg/key/public is the URL from which the JFrog GPG (GNU Privacy Guard) public key is downloaded. GPG keys are used to ensure the integrity and authenticity of downloaded packages.
| is a pipe. It takes the output of the command on its left and uses it as the input for the command on its right.
sudo apt-key add - adds the GPG key retrieved from the previous command to the list of trusted keys. This allows your system to verify the integrity and authenticity of the JFrog packages.

2. DISTRO=$(lsb_release -cs)

– This command assigns the output of lsb_release -cs to the variable DISTRO.
lsb_release is a utility that provides certain LSB (Linux Standard Base) and distribution-specific information.
-cs option prints the codename of your operating system (e.g., xenial, bionic, focal).
DISTRO now holds the codename of your Linux distribution, which will be used to specify the correct version of the repository for your system.

3. echo "deb https://releases.jfrog.io/artifactory/artifactory-debs ${DISTRO} main" | sudo tee -a /etc/apt/sources.list

echo is used to display a line of text/string that is passed as an argument.
– This command constructs a repository source line for JFrog Artifactory.
${DISTRO} is where the distribution codename variable is expanded to its value.
| sudo tee -a /etc/apt/sources.list appends the echoed line to /etc/apt/sources.list file. tee reads from standard input and writes to standard output and files. -a ensures it appends to the file without overwriting existing content. This command needs sudo because /etc/apt/sources.list is owned by root.

4. sudo apt-get update

– This command updates the list of available packages and their versions, but it does not install or upgrade any packages. It’s essential to run this after adding new repositories to ensure your package lists are up to date.

5. sudo apt-get install jfrog-artifactory-cpp-ce

– Finally, this command installs the JFrog Artifactory C++ CE (Community Edition) package. apt-get install is used to install packages. jfrog-artifactory-cpp-ce is the name of the package to be installed.

Overall, this script sets up your system to install JFrog Artifactory for C++ by adding the JFrog repository to your system’s software sources, ensuring the system recognizes it as a trusted source, and then proceeds to install the software.

Access in WebBrowser

  1. Copy the public Ip of server and open port 8081 and 8082
<public-ip:8081>
Username : admin
Password : password

Click on Login

Get Started

Next → skip → skip →

Leave a comment