Overview
This page describes how to install Artifactory on Linux, Solaris or Mac OS.
The procedure for all these platforms is identical, so for the sake of clarity the rest of this page will refer to Linux only.
You can install Artifactory on your Linux system in one of the following ways:
Running as root to install Artifactory as a service or RPM distribution
To install Artifactory as a service or RPM distribution you must have root privileges.
To run as root either execute the following command:
su -
or precede all commands with sudo (e.g. sudo service artifactory start)
If you are unable to get root privileges please contact your system administrator.
Configuring Your Database and Filestore
Once you have completed installing Artifactory, make sure you configure its database and filestore according to your preference. For details, please refer to Configuring the Database and Configuring the Filestore.
Page Contents
Requirements
Setting JAVA_HOME
As mentioned in the section on System Requirements, make sure that your JAVA_HOME environment variable is correctly set to your JDK installation.
Setting Java Memory Parameters
While not a strict requirement, it is recommended to modify the JVM memory parameters used to run Artifactory.
If you can reserve at least 512MB for Artifactory, the recommended values for JVM parameters are:
Recommended minimal JVM parameters
The larger your repository or number of concurrent users, the larger you need to make the -Xms and -Xmx values accordingly. Recommended minimal values are:
-server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC
For more recommendations about your hardware configuration (especially the -Xmx parameter), please refer to Recommended Hardware.
Where you set your JVM parameters depends on how you are running Artifactory:For a manual installation, modify JAVA_OPTIONS in $ARTIFACTORY_HOME/bin/artifactory.default.
For a service installation, modify JAVA_OPTIONS in $ARTIFACTORY_HOME/etc/default (you will need to uninstall and then reinstall the service after making the modification)
For an RPM or Debian installation, modify JAVA_OPTIONS in /etc/opt/jfrog/artifactory/default
Manual Installation
Installing Artifactory
To install Artifactory manually, simply unzip the Artifactory download file to a location on your file system. This will be your $ARTIFACTORY_HOME location.
No further action is needed.
Don't forget to modify your JVM parameters as needed by setting JAVA_OPTIONS in $ARTIFACTORY_HOME/bin/artifactory.default.
Running Artifactory
You can run Artifactory manually to see its behavior by directly executing:
$ARTIFACTORY_HOME/bin/artifactory.sh
The console is locked on the Artifactory process and you can stop it cleanly with Ctrl+C.
To directly run Artifactory as a daemon process, using the environment variables of the shell you are currently in, execute the following script:
$ARTIFACTORY_HOME/bin/artifactoryctl start
Startup time
Depending on your system performance it may take Artifactory several seconds to start up. If you try to access Artifactory through your browser while it is starting up, within a few seconds it will provide a notification that it is in the startup process.
Using the same script, you can check if Artifactory is running and display its process id, or stop it using:
Checking if Artifactory is running or stopping it
$ARTIFACTORY_HOME/bin/artifactoryctl check | stop
To run the Artifactory UI see Accessing Artifactory.
Service Installation
Artifactory is packaged as a zip file with a bundled Tomcat, and a complete install script that can be used to install it as a service running under a custom user.
Permissions
When running Artifactory as a service, the installation script creates a user called Artifactorywhich must have run and execute permissions on the installation directory.
Therefore it is recommended to extract the Artifactory download file into a directory that gives run and execute permissions to all users such as /opt
Don't forget to modify your JVM parameters as needed by setting JAVA_OPTIONS in $ARTIFACTORY_HOME/etc/default.
You need to reinstall the service for your changes to take effect.
Installing Artifactory
To install Artifactory as a service, browse to your $ARTIFACTORY_HOME/bindirectory and execute the following command as root:
Running the installation script as root
$ARTIFACTORY_HOME/bin/installService.sh [USER [GROUP]]
The following table describes the sequence of commands performed by the install script:
User creationCreates a default user named artifactory($ARTIFACTORY_USER). You can change the default user by editing the $ARTIFACTORY_USERvalue in /etc/opt/jfrog/artifactory/default.
You can also optionally run the install script to start the Artifactory service under a different user by passing in the user name as the first parameter. If you include the user name, you may also optionally include a group.
etc configCreates the folder /etc/opt/jfrog/artifactory, copies the configuration files there and creates a soft link in$ARTIFACTORY_HOME/etc
etc defaultCreates the file /etc/opt/jfrog/artifactory/default containing the main environment variables needed for Artifactory to run:JAVA_HOME, ARTIFACTORY_USER, ARTIFACTORY_HOME, JAVA_OPTIONS,... The /etc/opt/jfrog/artifactory/default is included at the top of artifactoryctland can include any settings.
To modify your JVM parameters modify JAVA_OPTIONS in /etc/opt/jfrog/artifactory/default
init.dCopies the service script file artifactoryto /etc/init.d/artifactory
Logs folderCreates the folder $ARTIFACTORY_HOME/logs, makes it writable for the user ARTIFACTORY_USER and creates a soft link $ARTIFACTORY_HOME/logs.
The $ARTIFACTORY_HOME/tomcat/logs folder is linked to $ARTIFACTORY_HOME/logs/catalina.
Backup folderCreates the folder $ARTIFACTORY_HOME/backup, so you must create a link if you want this folder to point to a different place (such as /var/backup/artifactory for example). The script makes $ARTIFACTORY_HOME/backup writable for the user ARTIFACTORY_USER.
Data folderCreates the folder $ARTIFACTORY_HOME/data, so you must create a link if you want this folder to point to somewhere else. The script makes it writable for the userARTIFACTORY_USER.
chkconfig callsThe script calls add and list(you can see the output), and then activates the Artifactory service
Running Artifactory
To start or stop Artifactory as a service you must be running as root and can use the following command:
service artifactory start | stop
Checking the status of the Artifactory service
Once Artifactory is correctly installed, you can check if it is running with:
service artifactory check
If Artifactory is running, you should see its pid.
If Artifactory is not running you will see a list of environment variables used by the service.
You can also check the Artifactory log with:
tail -f $ARTIFACTORY_HOME/logs/artifactory.log
When installing from an RPM or Debian distribution, Artifactory is generally started as rootand will suinternally to the $ARTIFACTORY_USER user.
Security
For reasons of security, it is not recommended to leave the $ARTIFACTORY_USER variable undefined with Artifactory running as the current user, especially if the current user is root.
To run the Artifactory UI see Accessing Artifactory.
RPM or Debian Installation
Artifactory can also be installed from an RPM or Debian distribution on Red Hat compatible Linux distributions.
The installation package creates a dedicated user, installs a stripped-down distribution of the Apache Tomcat container configured for Artifactory (on port 8081), and registers this Tomcat as a service (but does not start it immediately).
This package effectively replaces the different setup scripts included with the Artifactory Zip distribution.
Managed Files and Folders
When installed from an RPM distribution, Artifactory retains the FHS (Filesystem Hierarchy Standard) format:
File/FolderLocationOwnership
Artifactory home/var/opt/jfrog/artifactoryartifactory
Artifactory etc/etc/opt/jfrog/artifactoryartifactory
Artifactory logs/var/opt/jfrog/artifactory/logsartifactory
Artifactory env variables/etc/opt/jfrog/artifactory/defaultartifactory
Tomcat home/opt/jfrog/artifactory/tomcatartifactory (root for sub dirs)
Artifactory startup script/etc/init.d/artifactoryroot
Artifactory binary/opt/jfrog/artifactoryroot
Installing Artifactory
To install Artifactory from an RPM or Debian distribution you must be running as root and can use the corresponding commands below:
Installing Artifactory Pro from an RPM distribution...
wget https://bintray.com/jfrog/artifactory-pro-rpms/rpm -O bintray-jfrog-artifactory-pro-rpms.repo
sudo mv bintray-jfrog-artifactory-pro-rpms.repo /etc/yum.repos.d/
sudo yum install jfrog-artifactory-pro
Installing Artifactory OSS from an RPM disribution
wgethttps://bintray.com/jfrog/artifactory-rpms/rpm-O bintray-jfrog-artifactory-rpms.repo
sudo mv bintray-jfrog-artifactory-rpms.repo /etc/yum.repos.d/
sudo yum install jfrog-artifactory-oss
Installing Artifactory Pro from a Debian distribution...
echo "deb https://jfrog.bintray.com/artifactory-pro-debs {distribution} {components}" | sudo tee -a /etc/apt/sources.list
Note: If you are unsure, components should be "main." To determine your distribution, run lsb_release -c
Example: echo "debhttps://jfrog.bintray.com/artifactory-pro-debsxenial main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install jfrog-artifactory-pro
Installing Artifactory OSS from a Debian distribution...
echo "debhttps://jfrog.bintray.com/artifactory-debs{distribution} {components}" | sudo tee -a /etc/apt/sources.list
Note: If you are unsure, components should be "main." To determine your distribution, run lsb_release -c
Example: echo "deb https://jfrog.bintray.com/artifactory-pro-debs xenial main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install jfrog-artifactory-oss
JVM parameters
Make sure to modify your JVM parameters by modifying JAVA_OPTIONS in /etc/opt/jfrog/artifactory/default as appropriate for your installation.
Running Artifactory
To start or stop Artifactory you must be running as root and can use the following command:
service artifactory start | stop
Checking the status of the Artifactory service
Once Artifactory is correctly installed, you can check if it is running with:
service artifactory check
If Artifactory is running, you should see its pid.
If Artifactory is not running you will see a list of environment variables used by the service.
You can also check the Artifactory log with:
tail -f $ARTIFACTORY_HOME/logs/artifactory.log
When installing from an RPM distribution, Artifactory is generally started as rootand will suinternally to the $ARTIFACTORY_USER user.
Security
For reasons of security, it is not recommended to leave the $ARTIFACTORY_USER variable undefined with Artifactory running as the current user, especially if the current user is root.
Additional Configuration for MySQL
Since MySQL is a commonly used storage solution for RPM installations, Artifactory provides a small command line tool to assist you in Changing the Default Storage from Derby to MySQL if preferred.
The CLI tool is located in /opt/jfrog/artifactory/bin/configure.mysql.shand provides you with the option to run the MySQL configuration manually after running the RPM installation process.
Prerequisite
MySQL version 5.5 or higher must be pre-installed and running for the command line tool to work
To run the Artifactory UI see Accessing Artifactory.
Backup and Recover
When uninstalling an RPM distribution of Artifactory, it will save the $ARTIFACTORY_HOME folder and create a backup folder at /var/opt/jfrog/ while preserving symbolic links to remote filestores.
After installing a new instance of Artifactory, you can recover the configuration and filestore from this backup by running the script $ARTIFACTORY_BINARY/bin/recover.backup.sh.
Working with an external database
This process does not back up an external database, but rather its definitions in Artifactory. Therefore, when working with an external database, a manual dump should be performed before uninstalling the RPM, and then imported when starting the new installation.
Installing/Upgrading on a new machine
The Backup and Recover described above will only work if you are re-installing the RPM on the same machine. If you are installing or upgrading the RPM on a new machine you will need to use Import as described in the section on Upgrading Artifactory.
Running with Docker
From Version 3.6, Artifactory may be pulled as a Docker Image. For full details, please refer to TEMP - Installing with Docker.
The ARTIFACTORY_HOME Folder
It is important to know where your Artifactory home folder is located, since this folder stores your configurations and important repository data.
When Artifactory runs for the first time, it sets up a default configuration and creates all necessary files and folders under the ARTIFACTORY_HOME folder.
The default location of ARTIFACTORY_HOME is {user.home}/.artifactory.
To run Artifactory with the home folder set to a different location on the file system (particularly when installing Artifactory on a production server), either:Start the Tomcat virtual machine with -Dartifactory.home=
- or-
Set an ARTIFACTORY_HOME environment variable pointing to your preferred location before running the installation.
Artifactory creates the home folder on startup if it does not already exist.
Permissions on the Artifactory Home Folder
Make sure that the user running the Tomcat has write permissions on the Artifactory home folder.
Accessing Artifactory
Artifactory can be accessed using the following URL:
For example, if you are testing on your local machine you would use:
http://localhost:8081/artifactory