Do you know what is artifactory ? In a simple definition, it is the repository where we keep the artifacts. Here, the artifacts are the packages and binaries. For example, when you build some package like rpm, jar, deb, tar.gz , you can keep these packages in artifcatory.
For DevOps, the integration of Artifactory in Continuous Integeration plays a vital role. Through automated pipeline DevOps engineer can easily manage the packages/binaries in the Artifactory.
The Jfrog Artifactory is one the well known artifactory. It is available in enterprise and open source edition also. In this post, we will learn how to install Jfrog artifactory in CentOS 8. Here, we will use the Open Source Edition of jfrog.
Jfrog Package Version
Jfrog Artifactory OSS version 7.x
2. Web browser (firefox,chrome,safari)
3. Time should be synced correctly.
Our Jfrog Server Details:
Operating System: CentOS 8
IP Address: 192.168.33.10
Note: In this setup, we will use the by-default database use by Jfrog that is Apache’s Derby DB. It is already embedded with the Jfrog package so not require to install it separately. We have a choice to use other Database engine(mysql,MSSql,Postgresql etc.) along with Jfrog. For now, in this post external DB engines we are not presenting.
Follow the steps to install jfrog on CentOS 8
We have clubbed all the commands and created a simple script to install the Jfrog on CentOS 8. The benefit of using script is that we can run all the steps just executing the script at one shot. And also we can keep the script and use at any/multiple time.
Step 1: Create a file, The vi editor are our favourite hence using same.
Paste the given below content and save the file.
#/bin/bash # # Install jfrog on CentOS 8 # Blog: https://sharadchhetri.com # Disable the SELINUX on CentOS 8 # set temporary permissive selinux mode. reboot not require sudo setenforce 0 # In next reboot,the below line will help to set disable selinux permanently. sudo sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config # jfrog oss 7.x require Java 11, installing wget and openjdk sudo yum install -y wget java-11-openjdk* # download jfrog repo and directly keep in /etc/yum.repos.d dir sudo wget https://bintray.com/jfrog/artifactory-rpms/rpm -O /etc/yum.repos.d/bintray-jfrog-artifactory-oss-rpms.repo # install jfrog-artifactory-oss (open source) sudo yum install -y jfrog-artifactory-oss # yaml files are indent sensitive. So do not remove spaces while copying. Keep as it is. # creating system.yaml cat <
system.yaml configVersion: 1 shared: extraJavaOpts: "-server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC" security: node: database: EOF # copying above created system.yaml and replacing by original one. It backup the original system.yaml file also. sudo cp -brvf system.yaml /var/opt/jfrog/artifactory/etc/system.yaml # enable artifactoyr.service as well as start the service at a same time sudo systemctl enable --now artifactory
You can also download the above script from our github repo.
Step 2: Give executable permission to the script.
sudo chmod +x install_jfrog_centos8.sh
Step 3: Now execute the script.
Step 4: Once the script is finished successfully, now open the web browser and hit the Jfrog IP address at port number 8081 and do the post setup.
For example, as per our jfrog server ip address in web browser we have typed http://192.168.33.10:8081. This will open the Jfrog Dashboard in web browser from where you can do the rest of the post setup. We have depicted the same in given below slideshow.
To again login in Jfrog, you can use Syntax:
http://<-jfrog-ip-or-fqdn->:8081. Now you can easily manage the artifacts from Jfrog Artifactory. For DevOps, integerate the Jfrog Artifactory with CI/CD pipelines.