Another Stranger Me

my comments, my projects, my resources…

Alfresco 3.3g installation on CentOS 5.5 64-bit Linux server

The following guide will show you how to install a CentOS 5.5 64-bit Linux server based Alfresco ECM server. CentOS Linux distribution is amongst the most popular ones for its well known binary compatibility with major commercial Linux distribution Red Hat Enterprise Linux. CentOS is pretty much same as RHEL only without Red Hat’s vendor branding and artwork. Major reasons why you want to use CentOS over some other free Linux distributions is its stability and what’s most important hardware compatibility. Big hardware vendors like HP, Dell, or IBM tend to release Linux drivers for specific distributions only so choosing a distribution that is fully compatible with the USA-based and leading Linux vendor Red Hat is likely a smart move.

Now, important point to say is that Alfresco loves 64-bits so you want to install it on 64-bit hardware, operating system and use 64-bit Java Virtual Machine. While it certainly can work on 32-bit systems for production use I recommend that you use 64-bit system. Lets begin with Alfresco prerequisites.

Alfresco prerequisites

This article assumes you’ve got the base CentOS installation already completed as we focus on Alfresco not CentOS. So, you need just some base tools without GUI.

We begin my installing MySQL:

yum install mysql-server

I won’t go into much detail regarding MySQL configuration but as a minimum I always configure the following properties in /etc/my.cnf to support utf8 and also avoid problems with table names capitalization:

character-set-server = utf8
collation-server = utf8_bin
lower_case_table_names = 1

Restart MySQL:

service mysqld restart

Next, we download and install Sun JDK 6 (make sure you use the RPM version):

chmod +x jdk-6u20-linux-x64.rpm.bin

alternatives –install /usr/bin/java java /usr/java/jdk1.6.0_20/bin/java 100
alternatives –install /usr/bin/jar jar /usr/java/jdk1.6.0_20/bin/jar 100
alternatives –install /usr/bin/javac javac /usr/java/jdk1.6.0_20/bin/javac 100

Make sure you make the JDK 6 as default:

alternatives –config java
alternatives –config jar
alternatives –config javac

With CentOS 5 by default comes Tomcat 5.5 while Alfresco recommends Tomcat 6 so lets install it:

cd /etc/yum.repos.d
wget ‘’
yum update
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps

Unfortunately error message like this could appear:

java-1.4.2-gcj-compat- from installed has depsolving problems
–> Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat- (installed)
Error: Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat- (installed)

Fix for this can be found here or you can just do the following:

rpm -Uvh

Repeat installation if necessary.

You can try accessing Tomcat by:

service tomcat6 start

Open http://centos-hostname:8080 in browser (adjust Firewall properties in CentOS if necessary).

When you verify Tomcat is running and that you can access it, stop it:

service tomcat6 stop

Let’s do a bit more Tomcat configuration:

cd /usr/share/tomcat6
mkdir -p shared/classes/alfresco

nano conf/
>> shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

nano conf/tomcat6.conf
>> JAVA_OPTS=”$JAVA_OPTS -Xms128m -Xmx512m -XX:MaxPermSize=128M”

nano shared/classes/
# Sample custom content and index data location

# Sample database connection properties

# MySQL connection

# Outbound Email Configuration

# External locations

# CIFS configuration

# FTP configuration

Download MySQL JDBC connector to /lib:

pushd ~
tar xzf mysql-connector-java-5.1.13.tar.gz
cp mysql-connector-java-5.1.13/mysql-connector-java-5.1.13-bin.jar /usr/share/tomcat6/lib/

Let’s move on to Alfresco… Download WAR package and install it:

tar xzf alfresco-community-war-3.3g.tar.gz
unzip alfresco.war -d /usr/share/tomcat6/webapps/alfresco
unzip share.war -d /usr/share/tomcat6/webapps/share
cp -r endorsed /usr/java/jdk1.6.0_20/jre/lib/
cp -r extensions/* /usr/share/tomcat6/shared/classes/alfresco/
mysql -u root -p < extras/databases/mysql/db_setup.sql popd mkdir -p /var/lib/alfresco/alf_data mkdir -p /var/lib/alfresco/lucene chown -R tomcat:tomcat /var/lib/alfresco nano /usr/share/tomcat6/webapps/WEB-INF/classes/ >> log4j.appender.File.File=/var/log/tomcat6/alfresco.log
nano /usr/share/tomcat6/webapps/share/WEB-INF/classes/
>> log4j.appender.File.File=/var/log/tomcat6/alfresco.log

Alfresco should work now so lets start it up and watch the Tomcat log for errors:

service tomcat6 start
tail -f /var/log/tomcat6/catalina.out

Open http://centos-hostname:8080/alfresco and http://centos-hostname:8080/share in browser and login in both with default administrator account username: admin and password: admin.

Everything OK? Shutdown Tomcat again:

service tomcat6 stop

We have only a couple of things left to install so that we get full functionality. This includes ImageMagick, OpenOffice, and SWF Tools. Lets start with ImageMagick:

yum install ImageMagick

We will need to compile SWF Tools so we’ll install required files first by:

yum install zlib-devel libjpeg-devel giflib-devel freetype-devel gcc gcc-c++
tar xzf swftools-0.9.1.tar.gz
cd swftools-0.9.1
make install

Finally, install OpenOffice:

yum install

Unfortunately error message like this could appear:

java-1.4.2-gcj-compat- from installed has depsolving problems
–> Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat- (installed)
Error: Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat- (installed)

Fix for this can be found here or you can just do the following:

rpm -Uvh

Repeat OpenOffice installation, it should work now:

yum install

Lets create the init script so that we can run OpenOffice when system boots:

nano /etc/init.d/soffice

# chkconfig: 345 20 80
# description: init.d script for headless (2.3+ for RHEL5 32bit)
# credit: Chris Schuld
# processname: soffice
# source function library
. /etc/rc.d/init.d/functions

SOFFICE_ARGS=’-accept=socket,host=localhost,port=8100;urp -headless -nofirststartwizard’

start_soffice() {
echo -n $”Starting”
$SOFFICE_PATH/soffice.bin $SOFFICE_ARGS >/dev/null 2>&1 &
[ $? -eq 0 ] && echo_success || echo_failure
pidof soffice.bin > $SOFFICE_PIDFILE
start() {
stop() {
echo -n $”Stopping OpenOffice”
killproc soffice.bin
case “$1″ in
echo $”Usage: $0 {start|stop|restart}”

chmod +x /etc/init.d/soffice
chkconfig tomcat6 on
chkconfig soffice on
service soffice start
service tomcat6 start

You can verify the new work done by creating a site in share, uploading a Microsoft Office document and previewing it. If you can see its preview then all required transformations are working.

This concludes the installation of Alfresco 3.3g on CentOS 5.5 64-bit and I hope you can find it helpful. If so, please let me know in comments.


  1. Hi Ivan,

    Thanks for the nice article on the topic.

    BTW, there seems to be a following bug with LDAP-AD for the current version of 3.3g though it long appeared in 3.2.

    Are you aware about it?


  2. Thanks for feedback.
    You are correct. I think one reader already mentioned it in the other article’s comments so let me paste the workaround directly here from the link you provided so others can refer to it:

    08:53:31,375 User:System ERROR [security.sync.ChainingUserRegistrySynchronizer]
    Synchronization aborted due to error
    org.alfresco.error.AlfrescoRuntimeException: 01180001 User and group import failed
    Caused by: javax.naming.PartialResultException: Unprocessed Continuation Reference(s); remaining name ‘DC=testdomain,DC=foo’
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(
    at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumer
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumera
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration
    … 50 more

    This can be worked around modifying the bean ldapInitialDirContextFactory

    <bean id=”ldapInitialDirContextFactory” class=””>

    defined in the file common-ldap-context.xml, adding the entry:

    <entry key=”java.naming.referral”>

  3. Punyabrota Dasgupta

    July 9, 2010 at 08:47

    I used this for an alfresco installation using fedora on Amazon EC2. worked perfectly fine (except for some very minor tweaks). Thanks a lot!

  4. Manuel Moura

    July 11, 2010 at 13:50


    I tried to run the script soffice but I get some errors:
    /etc/init.d/soffice: line 13: urp: command not found
    /etc/init.d/soffice: line 43: restart}”: command not found

    Can you help me?

  5. I had a problem with Share. Alfresco worked fine when I tested it from the browser. But Share just shows a blank page. Anyone have an idea why that is so?

    Thanks for the great tutorial. It really helped.

  6. Charles Gruener

    July 23, 2010 at 16:37

    Awesome instructions.

    Any idea how to install the Sharepoint Protocol Support AMP? All instructions assume an amps directory and the Module Management Tool (MMT) are used, which this installation doesn’t have. I can unzip the vti-module.amp but don’t know where to put the files.


  7. Alfresco community WAR you downloaded includes the folder “commands” which includes all required tools for Linux.

  8. Muy bueno el manual se instalacion, la consola web funciona bien, sin embargo tengo problamas con el cifs, ya que me aparece este error:

    ERROR [org.alfresco.fileserver] [SMB] Server error : org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied

    favor si alguien sabe como remediarlo se lo agradecere

  9. You tutorial was awesome!

    Now that we have things rolling though we did an import of 300+ docs (via a ZIP file) and OpenOffice has had a high load for over 18 hours.. See our question to the forum here.

    Have you had issues with OpenOffice on CENTOS?

  10. Hi.

    I tried to run the script soffice but I get some errors:
    /etc/init.d/soffice: line 13: urp: command not found
    /etc/init.d/soffice: line 43: restart}”: command not found

    Can you help me?

    Your problem here is you probably copied the code directly off this page and are getting weird formatting issues(IE your ” and ‘ are probably periods .)

    Just open the file up with vi editor to correct the formatting issues.

    Hope this helps!

  11. I have tried to follow your tutorial, but i cannot dowload jdk-6u20-linux-x64.rpm.bin or 6u21 since everytime I try to download the sun site tells me that my transaccion cannot be approved. As far as I know my country (Panama) has been a US ally since 1920, so this is not export control stuff.
    any torrent to download it from?

  12. I searched on for the JDK jdk-6u21-linux-x64-rpm.bin and downloaded it. In case anybody else wants it.

    Also, if you’re installing on Centos 5.5 64bit, you will have an issue with “Missing Dependency: /usr/bin/rebuild-security-providers is needed by package….” when doing “yum update”.

    Apparently Redhat released a version of jpackage-utils that includes the dependency, and the problem comes in when the Redhat version of jpackage-utils is replaced by the JPackage version of jpackage-utils.

    So to fix do this:
    to remove jpackage ignoring dependencies
    #rpm -e jpackage-utils –nodeps

    to configure jpackage repo
    #cd /etc/yum.repos.d
    #wget ‘’

    to install again jpackage
    # yum install jpackage-utils


  13. Zied FAKHFAKH

    August 22, 2010 at 19:37

    @Erick Perez
    you can go safely with openjdk, you’ll need to install it like this:

    yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

    EPEL repository must be configured:

    after that proceed with the alternatives

  14. Zied FAKHFAKH

    August 22, 2010 at 19:42

    @Ivan thank you for this great article

    about Openoffice, giving this parameter in, will be enough to connect Alfresco to OOO:


    did not write the soffice script, any comment ?

  15. I think that for alternatives should be used directory /usr/java/latest as follows to allow easy upgrade of java

    alternatives –install /usr/bin/java java /usr/java/latest/bin/java 100
    alternatives –install /usr/bin/jar jar /usr/java/latest/bin/jar 100
    alternatives –install /usr/bin/javac javac /usr/java/latest/bin/javac 100

  16. Section to install alfresco should be

    tar xzf alfresco-community-war-3.3g.tar.gz
    unzip alfresco.war -d /usr/share/tomcat6/webapps/alfresco
    unzip share.war -d /usr/share/tomcat6/webapps/share
    cp -r endorsed /usr/java/latest/jre/lib/
    cp -r extensions/* /usr/share/tomcat6/shared/classes/alfresco/
    mysql -u root -p > log4j.appender.File.File=/var/log/tomcat6/alfresco.log
    nano /usr/share/tomcat6/webapps/share/WEB-INF/classes/
    >> log4j.appender.File.File=/var/log/tomcat6/alfresco.log

    (fixed path to java (using latest) and path to alfresco (missing alfresco))

  17. Thanks a lot, Ivan!

    There are some little typos in the code, but redeyed linuxoids like me will easily avoid errors 🙂

    Great work, Ivan, thanks once more.

  18. Bojan Markovic

    January 7, 2011 at 10:23

    Actually in my experience Alfresco works much more stable on CentOS x64 if it runs using OpenJDK 6. Tho this experience is based on using the alfresco binary installer (the bundle that has it’s own mysql, oo.o and tomcat) and not WAR. OTOH internal imagemagick, swftools and oo.o don’t work so well so what I do is get IM via yum, compile swftools 0.9.1, and use binary rpm installers of latest openoffice, and then just change and /openoffice/scripts/ to point to my custom locations of the software. Works like a charm.

    Also the initial database setup is not set for utf-8. You need to change /mysql/my.cnf and /mysql/scripts/ to setup default charset to utf8 anc dollation to utf8_general_ci to be able to use non-latin1 characters in filename and most of metadata.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Another Stranger Me

Theme by Anders NorenUp ↑