Monday, January 2, 2023

How to Install Jfrog Artifactory on Ubuntu 20/18

  

How to Install Jfrog Artifactory on Ubuntu 22/20

 This brief tutorial shows students and new users how to install JFrog Artifactory on Ubuntu 22.04 | 20.04.

JFrog Artifactory is cross-platform software that allows DevOps to manage multiple package repositories, hosted locally or in the cloud from a single platform.

JFrog Artifactory can integrates with your current environment, providing high availability with active/active clustering and multi-site replication to automate your pipeline and enable faster releases.

For more about JFrog Artifactory, please visit its homepage.

If you’re a student or new user looking for a Linux system to learn on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for beginners.and other device.

While learning Ubuntu, you will find that Linux isn’t so different than Windows and other operating systems in so many ways, especially when it comes to using the system to get work done.

To get started with installing JFrog Artifactory, follow the steps below:

Pre-requistes:

Install Artifactory on 2GM RAM, for AWS choose at least small or medium instance type.

Default ports 8081 and 8082 needs to be opened.

8081 for Artifactory REST APIs.

8082 for everything else (UI, and all other product’s APIs).


Step 1: Prepare Ubuntu

Before installing packages on Ubuntu, you must first update the server. To do that, run the commands below:

sudo apt update
sudo apt dist-upgrade
sudo apt autoremove

Running the commands above will update the remove obsolete packages from your system. It’s also a good to reboot the server after running the above commands.

Step 2: Install OpenJDK 8

To properly use JFrog Artifactory, you will need Java installed. First, download the Java 8 Development Kit: either the official Oracle JDK or Open JDK

For this tutorial, we’re going to be install OpenJDK.

To do that, run the commands below:

sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-doc -y

After installing Java, you can verify it by running the commands below:

java -version

It should output something similar as shown below:

Output:
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

Now that you have updated and installed Java, continue below to installing JFrog.

Step 3: Download and Install JFrog Artifactory

The quickest and easiest way to get JFrog installed is via a APT repository. Installing JFrog from the repository will allow you to always get the latest updates as they’re released.

To install, follow the steps below:

 echo "deb https://releases.jfrog.io/artifactory/artifactory-debs bionic main" | sudo tee -a /etc/apt/sources.list.d/jfrog.list
 wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -
 sudo apt update
 sudo apt install jfrog-artifactory-oss -y
 sudo systemctl start artifactory
 sudo systemctl enable artifactory
 sudo systemctl status artifactory



It should output similar lines as shown below:

artifactory.service - Artifactory service
   Loaded: loaded (/lib/systemd/system/artifactory.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-03-26 20:34:28 CDT; 3s ago
  Process: 6249 ExecStart=/opt/jfrog/artifactory/app/bin/artifactoryManage.sh start (code=exited, status=0/SUCCESS)
 Main PID: 8345 (java)
    Tasks: 0 (limit: 4666)
   CGroup: /system.slice/artifactory.service
           ‣ 8345 /opt/jfrog/artifactory/app/third-party/java/bin/java -Djava.util.logging.config.file=/opt/jfrog/artifacto

Mar 26 20:34:28 ubuntu1804 artifactoryManage.sh[6249]: metadata started. PID: 8924
Mar 26 20:34:28 ubuntu1804 su[8792]: pam_unix(su:session): session closed for user artifactory
Mar 26 20:34:28 ubuntu1804 su[8931]: Successful su for artifactory by root

Check if service is running locally on 8081 port

Enter

curl localhost:8081

Access Artifactory App
Go to browser and open public IP/DNS name along with port no:8081
http://your_public_dns_name:8081 
note if it is taking too long to come up, access the above on incognito mode or clear your cache browser 

You should see Artifactory welcome page, login with default username and password which is
admin/password

After Login, click on Get started. Now reset admin password. enter as Admin123@/Admin123@

Skip for base URL and skip proxy setup

Click Next

That's it! Artifactory is setup successfull

No comments:

Post a Comment

Jenkins Scripted Pipeline - Create Jenkins Pipeline for Automating Builds, Code quality checks, Deployments to Tomcat - How to build, deploy WARs using Jenkins Pipeline - Build pipelines integrate with github, Sonarqube, Slack, JaCoCo, Nexus, Tomcat

  Jenkins Scripted Pipeline - Create Jenkins Pipeline for Automating Builds, Code quality checks, Deployments to Tomcat - How to build, depl...