Installing CruiseControl on CentOS with Plesk
I recently setup CruiseControl on my server and figured it might be helpful to some to put together a little walk through. My server runs CentOS and Plesk which adds a bit of difficulty above the standard rehl *nix configurations. By the end of this walk through you should be able to browse to your CC on your server.
What your going to need
1. CruiseControl
2. FlexAntTasks
3. Opera or Mozilla
4. Linux Flash Player
5. Flex 3 SDK
6. Java JDK
7. a virtual frame buffer
Not all of these steps are required to get CruiseControl up and running on your server, but Im going to be posting more on setting up a full CI machine using CruiseControl so I figured, lets get everything on the box from the beginning so we don’t have to keep downloading and installing things. Lets get started…
Step 1
For easy cleanup create a tmp / download folder. We will move files around as we need to, but this way when we are done we can easily remove this folder for a quick and easy cleanup.
#mkdir /var/tmpStep 2
Download the files your going to use in your installation.
Download CruiseControl from: http://cruisecontrol.sourceforge.net/download.html I used version 2.6 and downloaded it directly to my server using wget http://downloads.sourceforge.net/cruisecontrol/cruisecontrol-bin-2.6.zip?modtime=1168552955&big_mirror=0 into my /var folder
#cd /var/tmp #http://downloads.sourceforge.net/cruisecontrol/cruisecontrol-bin-2.6.zip?modtime=1168552955&big_mirror=0
Download the FlexAntTasks
#wget http://weblogs.macromedia.com/pmartin/tooling/flexunit/FlexAntTasks.jarDownload Opera, I used Opera, but feel free to use mozilla, either one will be fine and wont change this walk through. Download Opera locally from here http://www.opera.com/download/ then upload it to your server /var/tmp folder.
Download the Linux Flash player from Adobe’s site and this one your going to want to download locally first then upload to your server. http://www.adobe.com/go/getflashplayerlinux
Downloading the Flex 3 SDK. A quick way to do this is go to http://www.adobe.com/products/flex/flexdownloads/index.html the first choice is the Flex 3 SDK, agree to the terms of the download, this will expose the download link.
Copy the link location for the sdk download and use a #wget to directly download this file into your server (I dont know if I can post this link directly here so I’m just showing a portion of it)
#wget http://download.macromedia.com/pub/flex/sdk....Download the Java JDK from sun’s download site http://java.sun.com/javase/downloads/index.jsp I went with jdk 5 release 15 which you can download directly to your server
#wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-1_5_0_15-linux-i586.bin?BundledLineItemUUID=RPhIBe.osm0AAAEaIc1xwMqB&OrderID=4H5IBe.o6LEAAAEaCs1xwMqB&ProductID=yL7ACUFBjqYAAAEYees5AXuQ&FileName=/jdk-1_5_0_15-linux-i586.binDownload virtual frame buffer, at this point we don’t have to download this file, assuming you have YUM installed then we will be able to simply yum install it later on. If you do not have YUM installed then you should install it for this and many other reasons.
Step 3
Install CruiseControl by extracting the zip file and copying it to the /opt folder
#cp cruisecontrol-bin-2.6.zip /opt/cruisecontrol-bin-2.6.zip #unzip /opt/cruisecontrol-bin-2.6.zip
Installing the JDK was fairly simple, one thing to note though which stumped me is that, where you extract the jdk is where is gets installed so pick your folder wisely I chose /usr/java. You can find more information on installing and configuring java jdk in linux here
#cp jdk-1_5_0_15-linux-i586.bin /usr/java/jdk-1_5_0_15-linux-i586.bin #cd /usr/local
You’ll need to make this folder executable
#chmod +x jdk-1_5_0_15-linux-i586.binNow run the installer
./jdk-1_5_0_15-linux-i586.bin
Now that java is installed you will need to configure your Java Home, you can find more information on this here. You can set your Java Home by adding the export path to your bash profile.
#vi ~/.bash_profileadd in the lines:
export JAVA_HOME=/usr/java/ export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
save and close this file and to see your changes you’ll need to log out and log back in.
At this point we have CruiseControl and Java installed, now we need to install Opera, we need to do this step before we can install the flash player because the flash player installer will require either Mozilla or Opera to be installed.
#cd /var/tmp #tar -zxvf opera-9.5.tar.gz
Run the Opera installer, this will install Opera to the “/usr/bin/opera” folder, remember or copy this path because you will need it in the next step. If you ever need to get the path of Opera or any application for that matter simply use the #which command which will return back the path to the application
#which operaNow lets install the linux flash player
#cd /var/tmp #tar -zxvf install_flash_player_9_linux.tar.gz #cd install_flash_player_9_linux #flashplayer-installer
When prompted for the Opera path paste in the path from above.
Last but not least lets install the Virtual Frame buffer needed by Flash to run in linux, we will do this using YUM, again if you do not have YUM I would suggest installing it, as it will make this and many other common installations much much simpler.
yum install XvfbStep 4
Now if all goes as planned, or if I haven’t completely butchered this install walk through then you should be able to now start CruiseControl and start using it via your web browser. To start CruiseControl
#cd /opt/cruisecontrol-bin-2.6 # ./cruisecontrol.sh
You should see CruiseControl running in your browser on port 8080 http://YourDomain.com:8080
There's 1 Comment So Far
September 4th, 2008 at 4:32 am
Very handy description. Not only suited for installing CruiseControl…..
Thanks a lot for the clear description.
Theo Linnenbank
Share your thoughts, leave a comment!