Artifactory in CentOS

Whew, I just had quite a difficult time getting Artifactory to install and run in CentOS. They have a nice installation guide, and it almost worked but not quite.

I am using the JPackage repository, so my java installation probably came out of there. And it seems to be slightly nonstandard, so I had to find the correct paths to make Artifactory happy.

Oh and also, I’m using the standalone Artifactory. I think it’s high time for me to learn an application server but for now, this is the last piece of my setup so I’ll let it be. Those of you that have the slightest clue about application servers might want to stop right here and just drop the Artifactory war file in your server.

Anyway, I’ll get to the point. Here’s what to do:

  • Unzip artifactory somewhere. I unzipped it inside /usr/local; so, my ARTIFACTORY_HOME = “/usr/local/artifactory”.
  • su and cd to that directory, then run ./bin/install.sh
  • cd etc (or /etc/artifactory, but not /etc; install.sh creates a symlink in $ARTIFACTORY_HOME/etc that points to /etc/artifactory)
  • Now edit the file ‘default’ with your favorite editor (vim default).
  • Uncomment or add the two lines:
  • export JAVA_HOME=/usr
  • export JAVA=/bin/java
  • Save and close this file. Now /sbin/service artifactory start – and you should be good to go!
  • Optionally, before starting (or do a restart afterwards), edit jetty.xml inside the etc directory and customize the port that Jetty runs on, on line 52.

Feel free to comment below if you found this useful or if you have anything else to add!

Share this article:
  • Print
  • RSS
  • email
  • Digg
  • del.icio.us
  • Facebook
  • Twitter
  • Live
  • StumbleUpon

Leave a Reply