Download Tomcat 6
Download Artifactory from http://sourceforge.net/projects/artifactory/files/artifactory/
Extract Tomcat to /opt/tomcat/artifactory (this is the default location specified by the Artifactory Tomcat installation script, we can change the location as per our convenience but for that we have to change the tomcat location in the installation script)
# unzip apache-tomcat-6.0.36.zip
# mkdir /opt/tomcat
# mv apache-tomcat-6.0.36 /opt/tomcat/artifactory
Extract Artifactory into /opt/artifactory/current (this is the default location specified by the Artifactory Tomcat installation script, we can change the location as per our convenience but for that we have to change the Artifactory location in the installation script)
# unzip artifactory-126.96.36.199.zip
# mkdir /opt/artifactory
# mv artifactory-188.8.131.52 /opt/artifactory/current
Run the Artifactory tomcat installation script
Login to MySQL server with sufficient privileges and create the MySQL database for Artifactory and the database user.
mysql> create database artifactory character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on artifactory.* TO 'artifactory'@'localhost' identified by 'artifactory';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Edit the artifactory.system.properties file
# pico /opt/artifactory/current/etc/artifactory.system.properties
Add (this line may be already there, just have to uncomment it) the following line
This configuration keeps all artifacts information in MySQL and stores the artifact binary data on the file system. This is the recommended configuration.
Edit the repo.xml file for filesystem-mysql and add the mysql connection details
# pico /opt/artifactory/current/etc/repo/filesystem-mysql/repo.xml
Download the MySQL JDBC driver (e.g. mysql-connector-java-5.1.22.zip file) from http://dev.mysql.com/downloads/connector/j/
Extract the zip file
# unzip mysql-connector-java-5.1.22.zip
# cd mysql-connector-java-5.1.22
Copy it to Artifactory tomcat’s lib folder
# cp mysql-connector-java-5.1.22-bin.jar /opt/tomcat/artifactory/lib/
Note: If you forget to copy this file, you may see the following error when you try to access Artifactory using a web browser.
# service artifactory start
We may get the following error while starting, even though we have correct value for $JAVA_HOME:
Using ARTIFACTORY_HOME: /opt/artifactory/current
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
ERROR: Artifactory Tomcat server did not start. Please check the logs
In this case open the /etc/artifactory/default file and uncomment the export JAVA_HOME line and add the correct JAVA_HOME value
We may also get the following error message while starting Artifactory service:
touch: cannot touch `/var/lock/subsys/artifactory': No such file or directory
Just create the subsys directory inside the /var/lock directory to resolve it.
# mkdir /var/lock/subsys
If everything is OK, our Artifactory service will start successfully.
That’s it, installation is pretty simple and well documented.