- 1 Preface
- 2 Requirements
- 2.1 JDK
- 2.2 Operating Systems
- 2.3 Browsers
- 3 Standalone Jetty
- 3.1 Windows
- 3.2 Unix
- 3.2.1 Running Manually
- 3.2.2 Linux Service
- 4 Tomact and Other Servlet Containers
Preface
Artifactory can be installed and run in two modes:
- As a standalone server (and Unix service) using the Jetty Servlet Container.
- As a web application under any Servlet Container.
Requirements
JDK
Valid JDK 1.5+ installed on the server machine. At least 300MB of allocated Java heap size is recommended.
Operating Systems
Artifactory has been reported to run fine on Windows, Linux, Solaris and MacOS X. Other platforms that support JDK 1.5 and above, should be OK, in theory, but it is suggested to stay with the mainstream platforms.
Browsers
Artifactory has been tested with Firefox 2.0 and IE 7. Other browsers and other versions are also known to work, but have not been throughly tested and might behave erratically.
Standalone Jetty
Make sure you have set the JAVA_HOME environment variable to point to a valid JDK 1.5+ home.
Windows
Just execute "artifactory.bat" under the bin folder. This will look for the Java executable and run Artifactory's main class.
Unix
It is recommended to check the validity of your environment first by running artifactoryctl check under the bin folder. This script is a modification of the Jetty init script and is quite well documented.
Running Manually
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 clean with CTRL+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 in.
Linux Service
To setup Artifactory correctly as a Linux service run, as root, the install.sh script under the bin directory.
The install script is documented and you should look at it before running it. Anyway, here is the main information about what this script is doing:
| User creation | Creates a user named "jetty" ($JETTY_USER) by default. You can change the default user by editing the $JETTY_USER value in /etc/artifactory/default. The install script accepts the user name as its first and only parameter. |
| etc config | Creates the folder /etc/artifactory, copies the configuration files there and creates a soft link in $ARTIFACTORY_HOME/etc |
| etc default | Creates the file /etc/artifactory/default that contains the main environment variables needed for artifactory to run: JAVA_HOME, JETTY_USER, ARTIFACTORY_HOME, JAVA_OPTIONS,... The /etc/artifactory/default is included at the top of artifactoryctl and so can include whatever you wish. NOTE: The default max memory is 1GB |
| init.d | It copies the file artifactoryctl to /etc/init.d/artifactory |
| Logs folder | Creates /var/log/artifactory folder, makes it writable for the user JETTY_USER and creates a soft link $ARTIFACTORY_HOME/logs. |
| Backup folder | Creates the folder ARTIFACTORY/backup, so you will need to create a link if you wish this folder to point to somewhere else (like /var/backup/artifactory for example). The script makes $ARTIFACTORY_HOME/backup writable for the user JETTY_USER. |
| Data folder | Create the folder ARTIFACTORY/data, so you will need to create a link if you wish this folder to point to somewhere else. The script will make it writable for the user JETTY_USER. |
| 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 $JETTY_USER user. If the $JETTY_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.
Tomact and Other Servlet Containers
Artifactory is a standard Java EE web application. As such, it can be installed and run on any 2.5 compliant Servlet Container. The instructions below refer to installation on Tomcat 5.5 and above, though we have many reports about Artifactory running seamlessly on JBoss, BEA Weblogic, IBM Websphere, etc.
Startup the Servlet Container VM with -Dartifactory.home=$ARTIFACTORY_HOME, pointing to the location of your Artifactory home folder (If you do not specify this property it will default to ${user.home}/.artifactory).
Alternatively, you can also set an ARTIFACTORY_HOME environment variable to point to your Artifactory home folder.
Make Sure the folder is writable by the user running the Servlet Container.
Artifactory will try to create the folder on startup if it does not exist.
Make sure the Artifactory configuration file $ARTIFACTORY_HOME/etc/artifactory.config.xml and the log4j configuration file $ARTIFACTORY_HOME/etc/log4j.properties exist in their respective locations.
Deploy the artifactory.war file into the container.
That's it! ![]()
A Note About Pre-packaged Tomcat Distributions
There have been a reports suggesting there are known problems deploying to automatically Tomcat installed as part of various Linux distros, mainly with default security settings.
See, for example: http://www.nabble.com/Re%3A-java.lang.NoClassDefFoundError%3A-org-quartz-CronExpression-p13139289.html
Please check the specific Tomcat installation you are using or download and install the "standard" Tomcat from the Apache site.
Comments (1)
Jan 31, 2008
Piter de Vries says:
As a simple bugfixing comment that could be added on some obscure page: o...As a simple bugfixing comment that could be added on some obscure page: out of all the times I have installed the artifactory on different systems, the server occassionally refuses to start without any other function using the targetted port, spitting out various disconnected error messages. If so happens, the blindingly simple solution is to close down all instances of java running and restart the server. While it works like magic, it was not entirely obvious the first time I was struck.
Regards// DeVries