When using Unix, it is possible to install Artifactory as a Unix service or run it manually.
Before you install is recommended you first verify your current environment by running artifactoryctl check under the $ARTIFACTORY_HOME/bin folder (this script is, in fact, a customized Jetty init script).
Artifactory is packaged with a complete install script that can be used to install it as a Unix service running under a custom user and using the standard Unix directories.
To setup Artifactory correctly as a Linux service run, as root, the $ARTIFACTORY_HOME/bin/install.sh script.
Here is the main information about what this script is doing:
User creation |
Creates a user named "artifactory" ( |
etc config |
Creates the folder |
etc default |
Creates the file |
init.d |
It copies the file |
Logs folder |
Creates |
Backup folder |
Creates the folder |
Data folder |
Create the folder |
chkconfig calls |
The script calls add, list (you can see the output), then activate the Artifactory service |
After running the script successfully you can test the installation by running: service artifactory check or /etc/init.d/artifactory check
And if everything is OK, start artifactory with:
service artifactory start |
or
/etc/init.d/artifactory start |
You can then check the Artifactory log with:
tail \-f $ARTIFACTORY_HOME/logs/artifactory.log |
Normally Artifactory will be started as root (when running as a service) and will su internally to the $ARTIFACTORY_USER user. If the $ARTIFACTORY_USER is undefined Artifactory will run as the current user, which is not recommended, especially if the current user is root, due to security considerations.
You can run artifactory manually with artifactory.sh directly to see its behavior. The console will be locked on artifactory process and you can stop it cleanly with crtl+c.
You can also try executing
artifactoryctl check|start|stop |
to directly run Artifactory as a daemon process, using the environment variable of the shell you are currently in.