How to install JFrog Artifactory on CentOS 7

Share on Social Media

Discover how to install JFrog Artifactory on CentOS 7 with our comprehensive guide. Follow step-by-step instructions to set up your repository manager efficiently. #centlinux #linux #devops

What is JFrog Artifactory?

Artifactory is a universal repository manager created by JFrog. A repository manager is software application designed to manage binary components related to an application. Being a universal repository manager, Artifactory supports all major packaging formats like Apache Maven, Gradle, Docker and many more.

In DevOps environments, Artifactory is used by build tools such as Apache Ant, Maven and Gradle to serve as the local repository for their respective artifacts. Although using Artifactory is not mandatory in DevOps environment, but it can be used to accelerate the CI/CD process.

JFrog Artifactory is a commercial product. However, there is an OSS (Open Source Software) version is available with limited features. We will use this OSS version in our article. We will install JFrog Artifactory on CentOS 7 and deploy and use MariaDB database as the backend database for Artifactory.

How to install JFrog Artifactory on CentOS 7
How to install JFrog Artifactory on CentOS 7

Read Also: How to install Artifactory on Rocky Linux 9

System Specification

For this article, we have utilized a CentOS 7 virtual machine configured with the following system specifications to ensure a stable and consistent environment for testing and demonstration purposes.

  • Hostname – artifactory-01.example.com
  • IP Address – 192.168.116.130/24
  • Operating System – CentOS 7.6

Install Java Development Kit on CentOS 7

JFrog Artifactory requires Java Development Kit (JDK) 8 update 45 or above.

In CentOS 7, the OpenJDK (an open-source Java Development Kit) can be installed using yum command. However, if you are using a Red Hat Enterprise Linux (RHEL) 7 then you have to configure a Local yum Repository and then you will be able to install OpenJDK using yum command.

yum install -y java-1.8.0-openjdk-devel

Since, our server is minimal installed, therefore, yum has installed various dependent packages along with OpenJDK.

Set JAVA_HOME environment variable.

echo "export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64" >> /etc/profile
. /etc/profile
env | grep JAVA

Output:

JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64

OpenJDK has been installed on CentOS 7.

Install JFrog Artifactory on CentOS 7

Install preqrequisite packages using yum command.

yum install -y net-tools rsync

Download latest JFrog Artifactory OSS RPM and copy it to the home directory of root user.

By using yum command, install Jfrog Artifactory on CentOS 7.

yum install -y jfrog-artifactory-oss-6.6.5.rpm

Set ARTIFACTORY_HOME environment variable.

echo "export ARTIFACTORY_HOME=/opt/jfrog/artifactory" >> /etc/profile
. /etc/profile
env | grep ARTIFACTORY_HOME

Output:

ARTIFACTORY_HOME=/opt/jfrog/artifactory

JFrog Artifactory has been installed on CentOS 7.

Install MariaDB Database on CentOS 7

It is recommended to install JFrog Artifactory on CentOS 7 with an external database. Being a hardcore FOSS (Fan of Open Source Software), we selected MariaDB Database for this purpose.

Install MariaDB Server from CentOS yum repository.

yum install -y mariadb-server

Start and Enable MariaDB Service.

systemctl start mariadb.service
systemctl enable mariadb.service

Configure MariaDB database instance as follows.

mysql_secure_installation

Output:

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Recommended Training: The Linux Command Line Bootcamp: Beginner To Power User from Colt Steele

3998050 2ed8
show?id=oLRJ54lcVEg&bids=1074530

Create JFrog Artifactory Database

Create and configure Artifactory database.

/opt/jfrog/artifactory/bin/configure.mysql.sh

Output:

########################################################
# Welcome to the Artifactory MySQL configuration tool! #
########################################################

Stopping the Artifactory service...

Please enter the MySQL server admin username [root]:

Please enter the MySQL server admin password:
Please enter the Artifactory database username [artifactory]:

Please enter the Artifactory database password [password]:
Creating the Artifactory MySQL user and database...

No MySQL JDBC connector found. Download or copy one needed.
Does the current server has access to the Internet? [Y/n]Y

Downloading mysql-connector-java-5.1.24.jar to /opt/jfrog/artifactory/tomcat/lib...

Configuration completed successfully!
You can now start up the Artifactory service to use Artifactory with MySQL.
Press enter to exit...

There is a known issue with PIDs in new versions of systemd, due to the more restricted handling of PID files by systemd. Therefore, you may encounter some PIDs error while starting artifactory.service.

systemctl start artifactory.service

Output:

Job for artifactory.service failed because the control process exited with error code. See "systemctl status artifactory.service" and "journalctl -xe" for details.

Artifactory service is not started, we need to edit service file to rectify this problem.

Edit artifactory.service and add the user and group who own the service.

vi /lib/systemd/system/artifactory.service

Add following directives under the [service] section.

User=artifactory
Group=artifactory

Set open file limits for the artifactory user.

echo "artifactory soft nofile 32000" >> /etc/security/limits.conf
echo "artifactory hard nofile 32000" >> /etc/security/limits.conf

Now edit the artifactoryManage.sh script.

vi /opt/jfrog/artifactory/bin/artifactoryManage.sh

Find and replace the following 4 lines of code with the given code.

#su -s "/bin/sh" ${ARTIFACTORY_USER} -c "${replicatorScript} start"
${replicatorScript} start

#su -s "/bin/sh" ${ARTIFACTORY_USER} -c "${replicatorScript} stop"
${replicatorScript} stop

#su -s "/bin/sh" ${ARTIFACTORY_USER} -c "export JAVA_HOME='$JAVA_HOME'; $TOMCAT_HOME/bin/startup.sh"
$TOMCAT_HOME/bin/startup.sh

#su -s "/bin/sh" ${ARTIFACTORY_USER} -c "export JAVA_HOME='$JAVA_HOME'; $TOMCAT_HOME/bin/shutdown.sh"
$TOMCAT_HOME/bin/shutdown.sh

Start and enable Artifactory service.

systemctl start artifactory.service
systemctl enable artifactory.service

Artifactory service has been started successfully.

Configure Linux Firewall

Now allow Artifactory service port to make it accessible from the network.

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

Configure JFrog Artifactory

Browse URL http://artifactory-01.example.com:8081 from a client browser.

Welcome to JFrog Artifactory Setup
Welcome to JFrog Artifactory Setup

Click on Next.

JFrog Artifactory - Admin Password
JFrog Artifactory – Admin Password

Set the password for default admin user of Artifactory and click on Next.

JFrog Artifactory - Configure a Proxy Server
JFrog Artifactory – Configure a Proxy Server

If this server access the Internet through a proxy, then configure it here or click on Skip.

Jfrog Artifactory - Create Repositories
Jfrog Artifactory – Create Repositories

Select the package types for which you want to create repositories. The default repositories for the selected package types will be created by the Artifactory. Or click on Skip.

JFrog Artifactory on-boarding completed
JFrog Artifactory on-boarding completed

The initial configuration of Artifactory has been completed. Click on Finish.

Artifactory Dashboard
Artifactory Dashboard

You have reached at the Dashboard of JFrog Artifactory Web UI. This dashboard is enriched with links to guides and documentation related to Artifactory. You can browse these links and start using Artifactory accordingly.

Frequently Asked Questions (FAQs)

What are the system requirements for installing JFrog Artifactory on CentOS 7?
Ensure your CentOS 7 system meets the minimum requirements: at least 4GB RAM, 2 CPU cores, and sufficient disk space (recommended 20GB+ for storage).

Do I need to install Java before setting up Artifactory?
Yes, Artifactory requires Java (OpenJDK or Oracle JDK) to run. Install a supported version (typically Java 8 or 11) before proceeding.

Which installation method is easiest for beginners?
The ZIP or RPM package installation is recommended for beginners, as it includes all dependencies and simplifies setup.

How do I start and stop Artifactory after installation?
Artifactory runs as a service—use systemctl commands (e.g., start, stop, restart) to manage it after installation.

How do I access Artifactory once it’s installed?
Open a web browser and navigate to http://<your-server-ip>:8081 (default port). The default credentials are admin/password—change them immediately after login.

Final Thoughts

Installing JFrog Artifactory on CentOS 7 equips your development environment with a powerful artifact repository manager that supports multiple package formats and integrates seamlessly with CI/CD pipelines.

By setting up the required dependencies, configuring the repository, and securing the installation, you’ve laid the groundwork for efficient and reliable artifact storage and distribution. For optimal performance and security, regularly update Artifactory, monitor system resources, and back up your data to protect against potential failures.

Looking for a Linux server expert? I provide top-tier administration, performance tuning, and security solutions for your Linux systems. Explore my Fiverr profile for details!

Looking for something?

6 responses to “How to install JFrog Artifactory on CentOS 7”

  1. Ashish Jha Avatar

    Hi Dear,

    According to your blog, I have created setup but I have found issues in it, Please suggest me. for your reference I have append below logs of Artifactory server.

    Logs:

    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
    … 105 more
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessJdbcHelperImpl': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Could not initialize database: Unable to load class: com.mysql.jdbc.Driver from ClassLoader:ParallelWebappClassLoader
    context: access
    delegate: false
    ———-> Parent Classloader:
    java.net.URLClassLoader@3a71f4dd
    ;ClassLoader:ParallelWebappClassLoader
    context: access
    delegate: false
    ———-> Parent Classloader:
    java.net.URLClassLoader@3a71f4dd

  2. Ahmer M Avatar

    Hi Ashish,

    Thanks for using my article.

    Although, the given log isn't enough to pin-point the actual problem. But, I have intuition that the problem is somehow related to MySQL Java connector. Therefore, I suggest you to repeat step /opt/jfrog/artifactory/bin/configure.mysql.sh again and check.

  3. Vaseem Javed Avatar

    As I reach step configure db, I see bin folder is missing

  4. Ahmer M Avatar

    This information is not enough to address the issue. Please contact me on Facebook page and discuss in detail.

  5. Mats Avatar

    the file is not found /opt/jfrog/artifactory/bin/configure.mysql.sh

  6. Ahmer M Avatar

    Please confirm the version of your Linux and JFrog Artifactory. If you are using the same version as in this article, then the file should be located at the same place.

Leave a Reply

Available for Amazon Prime