Install git on CentOS 5.5

I recently needed to install git on a CentOS 5.5 system. Unfortunately, the standard repositories do not provide the git packages. However, this is quickly fixed by adding the EPEL yum repository:

rpm -Uvh

Then simply run

yum install git

Have fun with git!

Posted in Uncategorized | Leave a comment

Install Java on CentOS

As you cannot install Oracle’s (former Sun’s) JDK with the comfy CentOS package manger Yum, you’ll have to install Java manually. This article describes how to install Java 1.6 via command line on CentOS 5.5. Let’s go!

Before we log into CentOS, we need to get the JDK download link from Oracle’s website. Therefore, go to and click the button Download JDK:

On the next page, select from the Platform drop down list either Linux (if your CentOS runs on a 32bit system) or Linux x64 for a 64bit system. Then, click Continue:

Choose your Java distribution

On the next page copy the download link by right-clicking on jdk-6u23-linux-x64.bin and choose Copy Link Location from the browser’s context menu:

Copy Java download link

Now, please log into your CentOS system via command line. We will install Java to /usr/java. If you prefer a different location just change the path accordingly in the following commandos:

  1. Create the folder /usr/java:
    cd /usr
    mkdir java
  2. Change to the java directory and download Java from Oracle (paste the long download URL we copied earlier between quotes):
    cd java
    wget ""
  3. Actually, the long URL we copied earlier redirects to the very download URL. So wget saved the download to a file named
    So, let’s rename the bulky filename:
    mv jdk-6u23-linux-x64.bin?AuthParam=1295528165_cf13992779f41d08023a501f6b61f497&TicketId=B%2Fw2lh2ATV9LQRBDPlFTkAXl&GroupName=CDS&FilePath=%2FESD6%2FJSCDL%2Fjdk%2F6u23-b05%2Fjdk-6u23-linux-x64.bin&File=jdk-6u23-linux-x64.bin jdk-6u23-linux-x64.bin
  4. Make sure the file is executable:
    chmod +x jdk-6u23-linux-x64.bin
  5. Next run the installer:
    At the end of the installation just hit enter.
  6. Remove the installation package:
    rm -f jdk-6u23-linux-x64.bin
  7. Finally, we need to add a symbolic link to the Java executable:
    ln -s /usr/java/jdk1.6.0_23/bin/java /usr/bin/java
    I assumed you only want to have one version of Java installed. Just in case you already have another Java version installed and you want to be able to flexibly choose among those versions, you can establish the symbolic link with the alternatives command:
    alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_23/bin/java 2
    alternatives --config java
    Choose the Java version you want to have referenced.

That’s it! Type java -version on the command line and you should get a similar result to this:

java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

Finally, you might want to add the environment variable JAVA_HOME (which is needed by Apache Tomcat server, for example). To do so, simply type this command in your command line:

echo "export JAVA_HOME=/usr/java/jdk1.6.0_23" >> /etc/profile

This commando will write the JAVA_HOME environment variable to the file /etc/profile which contains system wide environment configuration.

Here you go. Enjoy running Java applications on your CentOS system!

Posted in Dev | Tagged , | 2 Comments

Deploy Alfresco Share on Tomcat 6

As I could not find a complete tutorial on how to deploy Afresco Share on an existing Apache Tomcat version 6 I’ll now summarize all steps required.


Before following the next steps make sure you have

  1. Java 1.5 or Java 1.6
  2. Apache Tomcat 6.x
  3. MySQL 5.x


Step 1: Get Alfresco Community Edition

Download the file archive alfresco-community-war-3.2.tar.gz and unpack the archive. It contains the alfresco.war and share.war web applications that you’ll need to get Alfresco Share up and running.

Step 2: Create database and database user

On Mac OS/Linux open a shell, on Windows open the command line. Log on to MySQL with the root user:

> mysql -u root -p

Next, create the database and a user for Alfresco and grant the according rights to the database user:

mysql> create database alfresco default character set utf8;
mysql> create user alfresco identified by 'alfresco';
mysql> grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
mysql> grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;

Step 3: Prepare Apache Tomcat

Make sure that your Tomcat installation disposes of the directories <TOMCAT_HOME>/shared/classes and <TOMCAT_HOME>/shared/lib. Tomcat 6 does not get distributed with these directories by default. If they are missing, please create them. Next, open the file <TOMCAT_HOME>/conf/ and change the value of shared.loader= to:


That way, Tomcat loads for all web applications any classes/property files and libraries that are located in these directories.

Alfresco does not get shipped with a JDBC driver for MySQL. You can download the current driver from Unpack the archive and copy the driver mysql-connector-java-5.1.12-bin.jar (at the time of writing this post this driver was the current one) to <TOMCAT_HOME>/shared/lib.

Copy from your dowloaded unpacked alfresco-community-war-3.2.tar.gz archive the file <ALFRESCO_ARCHIVE>/extensions/extension/ to <TOMCAT_HOME>/shared/classes. Open the file and change the value of db.driver= to (line 29):


Before we can start deploying Alfresco, make sure your Tomcat installation has a configured heap size of at least 256 MB. By default, Tomcat is started with the default heap size of your JVM. Usually, with these default settings the deployment of Alfresco will fail.

To increase Tomcat’s heap size on a Unix/Linux system open the file <TOMCAT_HOME>/bin/ and add following line at the beginning of the file:

export CATALINA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=196m"

On Windows based systems open the file <TOMCAT_HOME>/bin/startup.cmd and add the following line at the beginning of the file:

set CATALINA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=196m"

In case Tomcat was running you have to restart it in order the heap size changes take effect.

Step 4: Deploy Alfresco web applications

Start Tomcat by executing the start script <TOMCAT_HOME/bin/ (Unix/Linux systems) or <TOMCAT_HOME/bin/startup.cmd (Windows systems).

Simply copy the file <ALFRESCO_ARCHIVE>/alfresco.war to <TOMCAT_HOME>/webapps. As long as you have not changed Tomcat’s default deploy settings, Tomcat will deploy the web archive automatically. Have a look at Tomcat’s logfile located at <TOMCAT_HOME>/logs/catalina.out. At the end of the log file there should be an entry similar to

18:52:46,528 User:System INFO  [service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.2.0 (2039) schema 2019 - Installed version 3.2.0 (2039) schema 2019

Next, copy the file <ALFRESCO_ARCHIVE>/share.war to <TOMCAT_HOME>/webapps. At the end of the Tomcat’s log file you should see an entry like

23:56:58,258  INFO  [] Successfully Initialized Web Framework

Well done, we are finished. Let’s open Alfresco Share in your favorite browser. Therefore, type http://localhost:8080/share in the address bar. You should the see the following screen:

Alfresco login

Login with username admin and password admin.
The document will help you to get acquainted with Alfresco Share. Have fun!

Posted in Dev | Tagged , , | 3 Comments

Eclipse Galileo WebDAV Plugin

As I never remember how to install the WebDAV plugin for Eclipse installations newer than version 3.1 I would like to share the information how to do that:

  1. Download the plugin FTP/WebDAV feature
  2. Unizp the downloaded file
  3. Copy the contents from the folder features to <YOUR_ECLIPSE_FOLDER>/features
  4. Copy the contents from the folder plugins to <YOUR_ECLIPSE_FOLDER>/plugins
  5. Restart Eclipse
  6. In Eclipse, choose from the menu bar Window > Show View > Other ... > Target Management > Site Explorer
  7. The Site Explorer view should be visible now. Right click into the Site Explorer view and choose New > Target Site
  8. From the popup window choose WebDAV, click Next and enter the Server URL, User and Password (in most cases you can leave the Proxy Server URL empty)

That’s it!

Posted in Dev | Tagged | 12 Comments

Hello World!

As with every new system/framework/programming language of course there needs to be shouted a loud hello to the world.

Hello World! Here I am. Finally, I got my blog site set up which was overdue for quite a while. I got so much useful information from people sharing their solutions to problems or thoughts on interesting topics so that I would like give back as much as I can!

Posted in Uncategorized | Leave a comment