Artifactory 3.4
Skip to end of metadata
Go to start of metadata
Table of Contents

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 these three 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.


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 JVM parameters

-server -Xms512m -Xmx2g -Xss256k -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+UseG1GC

 

In JDK 8 the PermSize and MaxPermSize parameters have been deprecated. If you continue to use these parameters you may see warnings in the Artifactory startup sequence, but these may be safely ignored.

Repository size and number of concurrent users

The larger your repository or number of concurrent users, the larger you need to make the -Xms and -Xmx values accordingly


Manual Installation

Installing Artifactory

To run 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.

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 Crtl+C.

To directly run Artifactory as a daemon process, using the environment variables of the shell you are currently in, execute the following script:

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

 

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 Linux service, running under a custom user.

Permissions

When running Artifactory as a service, the installation script creates a user called Artifactory which 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

Installing Artifactory

To install Artifactory as a service, browse to your $ARTIFACTORY_HOME/bin directory and execute the following command as root:

Running the installation script as root

 

The following table describes the sequence of commands performed by the install script:

User creation

Creates a default user named artifactory ($ARTIFACTORY_USER). You can change the default user by editing the $ARTIFACTORY_USER value in /etc/opt/jfrog/artifactory/default. The install script accepts the user name as its first and only parameter.

etc config

Creates the folder /etc/opt/jfrog/artifactory, copies the configuration files there and creates a soft link in$ARTIFACTORY_HOME/etc

etc default

Creates 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 artifactoryctl and can include any settings.

init.d

Copies the service script file artifactory to /etc/init.d/artifactory

Logs folder

Creates 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 folder

Creates 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 folder

Creates 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 user ARTIFACTORY_USER.

chkconfig calls

The 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:

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:

 

When running as a service, Artifactory is generally started as root and will su internally 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 Installation

Artifactory can also be installed from an RPM distribution on Red Hat compatible Linux distributions.

The RPM 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/Folder

Location

Ownership

Artifactory home

/var/opt/jfrog/artifactory

artifactory 

Artifactory etc

/etc/opt/jfrog/artifactory

artifactory 

Artifactory logs

/var/opt/jfrog/artifactory/logs

artifactory

Artifactory env variables

/etc/opt/jfrog/artifactory/default

artifactory 

Tomcat home

/opt/jfrog/artifactory/tomcat root

Artifactory startup script

/etc/init.d/artifactory

root

Artifactory binary

/opt/jfrog/artifactoryroot 

Installing Artifactory

To install Artifactory from an RPM distribution you must be running as root and can use the following command:

Running Artifactory

To start or stop Artifactory you must be running as root and can use the following command:

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:

 

When installing from an RPM distribution, Artifactory is generally started as root and will su internally 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.sh and 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.

 


Accessing Artifactory

Artifactory can be accessed using the following URL:

http://SERVER_DOMAIN:8081/artifactory.

For example, if you are testing on your local machine you would use:  http://localhost:8081/artifactory

  • No labels