Installing Alfresco (3.x, 4.x) on (32bit) Ubuntu

Recently I got into a twitter discussion about installing Alfresco Community on 32bit Ubuntu. Alfresco only provides 64bit installers these days (all-in-one), and the Tomcat distribution is no more. Since Alfresco is a Java app, the app doesn’t matter. It is Java and the helper applications needed, that need to be 32/64bit.

This blog will show you step by step how to install Alfresco and the helper apps on 32bit Ubuntu 11.10 (server). It will use OpenJDK (since it is the default in Ubuntu 11.10), LibreOffice (default in Ubuntu repositories) and MySQL (because I am more familiar with than Postgress). On the way we will install ImageMagick, Pdf2swf and FFmpeg.

First be sure we are on the latest version of everything:

sudo apt-get update
sudo apt-get upgrade

If you run Ubuntu on a VM, and your host is Windows, you might want to use Putty (an ssh client for Windows), and then you need an ssh server on your VMWare box:

sudo apt-get install ssh  openssh-blacklist openssh-blacklist-extra

Now you can access your VM from a Windows app, more easy if you need to copy a name or content into a file you are editing. I assume you download packages you need from the internet, and in the end this step-by-step guide expects them to exist in your home folder. You can either download these packages from within Ubuntu, or copy them into your home folder using WinSCP . We are going to install Alfresco in /opt/alfresco40c (4 zero c, the version number). Let’s create this folder right now:

sudo mkdir /opt/alfresco40c

And assign yourself permissions to write in that folder: (assuming your username is ‘uname’)

sudo chown -R uname /opt/alfresco40c

Validate your results by

ls -la /opt

You should note that your username shows in the line displaying folder alfresco40c


Lets install OpenJDK first. (SUN-Java, oh, sorry, Oracle is fine too, but requires more fuzzing with adding other repositories to Ubuntu.) (I happened to install this particular version because the person in question used this version of OpenJDK)

sudo apt-get install openjdk-6-jdk

There most likely is an issue with OpenJDK and Rhino. There are some workarounds too. If you can run the statement below in a terminal window, you’re fine:


Assuming you don’t need Rhino for anything other than Alfresco, you’re save to remove the rhino.jar library all together. See the Alfresco wiki for details and workarounds. I just renamed the rhino.jar provided by OpenJDK:

sudo mv /usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar /usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar.not

Let’s check if we got Java installed right:

java -version

responds with something like:

java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)
OpenJDK Client VM (build 20.0-b11, mixed mode)


Then we need MySQL

sudo apt-get install mysql-server mysql-client

Remind: Remember the root password you set when you install the server. You will need it later on!


mysql -u root -p

It will display:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.1.58-1ubuntu1 (Ubuntu)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

You type:

show databases;
MySQL responds with:
| Database           |
| information_schema |
| mysql              |
2 rows in set (0.05 sec)


ImageMagick, SWFTools, FFMpeg and OpenOffice

Since you install without the all-in-one installer, you also need ImageMagic, FFMpeg and OpenOffice:

sudo apt-get install imagemagick ffmpeg libreoffice

ImageMagick is used to convert and scale images. FFMpeg is needed if you store video in your repository and want to use the audio/video player plugin of Alfresco Share (assuming this will still work in version 4.0). The project is actually forked into the independent LibreOffice. Ubuntu has chosen to provide LibreOffice in their repositories over OpenOffice.


whereis convert
whereis ffmpeg
whereis soffice.bin

SWFTools is used to create flash from pdf documents, to allow previews of documents in Share. This tool does not exist in the 32bit repositories of Ubuntu 11.10. A workaround is to download a slightly older (32bit) version of this tool  from The download link is just below “Downloadable files” on the right-bottom of your page. Lets install this deb package:

sudo dpkg -i swftools_0.9.0-0ubuntu1_i386.deb


whereis pdf2swf


Download the latest Tomcat 6 from Apache: (my current version is 6.0.35). Unpack Tomcat (in your home folder):

tar -xvf apache-tomcat-6.0.35.tar.gz

Rename Tomcat to tomcat, and move it to where it should:

mv apache-tomcat-6.0.35 /opt/alfresco40c/tomcat

Lets’s validate if Tomcat is installed right, let’s start Tomcat:

cd /opt/alfresco40c/tomcat/bin 
Using CATALINA_BASE: /opt/alfresco40c/tomcat 
Using CATALINA_HOME:/opt/alfresco40c/tomcat 
Using CATALINA_TMPDIR:/opt/alfresco40c/tomcat/temp 
Using JRE_HOME: /usr 
Using CLASSPATH:/opt/alfresco40c/tomcat/bin/bootstrap.jar

And check (if there is a process running that contains ‘java’ in its signature):

ps -ef |grep java 
tpeelen 22460 1 8 15:35 pts/0 00:00:01 /usr/bin/java -Djava.util.logging.config.file=/opt/alfresco40c/tomcat/conf/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/alfresco40c/tomcat/endorsed -classpath /opt/alfresco40c/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/alfresco40c/tomcat -Dcatalina.home=/opt/alfresco40c/tomcat org.apache.catalina.startup.Bootstrap start 
tpeelen 22482 15472 0 15:35 pts/0 00:00:00 grep --color=auto java

Rock! That works. Now, shutdown Tomcat:

Using CATALINA_BASE: /opt/alfresco40c/tomcat 
Using CATALINA_HOME:/opt/alfresco40c/tomcat 
Using CATALINA_TMPDIR:/opt/alfresco40c/tomcat/temp 
Using JRE_HOME: /usr 
Using CLASSPATH:/opt/alfresco40c/tomcat/bin/bootstrap.jar


ps -ef |grep java 
tpeelen 22516 15472 0 15:38 pts/0 00:00:00 grep --color=auto java

There is no process running that contains ‘java’…  Nice. That works.

Add additional folders for use with Alfresco:

mkdir /opt/alfresco40c/tomcat/shared
mkdir /opt/alfresco40c/tomcat/shared/classes
mkdir /opt/alfresco40c/tomcat/shared/lib

Edit Tomcat’s to tell Tomcat to actually use the added directories under ‘tomcat/shared’:

nano /opt/alfresco40c/tomcat/conf/

Change the value of the shared.loader= property to the following:


Save the file by entering Ctrl-X, a ‘Y’ and an <Enter>.

By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs that are received from a browser. This may cause problems when creating, uploading, and renaming files with international characters. Edit the server.xml file

nano /opt/alfresco40c/tomcat/conf/server.xml file.

Locate the Connector section, and then add the URIEncoding=”UTF-8″ property.

<Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000" redirectPort="8443" />

Save the server.xml file (Ctrl-X, a ‘Y’ and an <Enter>).

Download the recent JDBC driver belonging to you MySQL instance (Ubuntu is shipped with MySQL 5.1 by default). Go to and download the recent version.

Extract the archive (in your home directory)

tar -xvf mysql-connector-java-5.1.18.tar.gz

And copy the driver to Tomcat:

cp mysql-connector-java-5.1.18/mysql-connector-java-5.1.18-bin.jar /opt/alfresco40c/tomcat/lib


We are getting there. Download the from: (Any other version will do too, be sure to select, on the download page, the link ‘Custom Installs & Optional Modules’!)

Unzip the archive in your home folder. You probably don’t have ‘unzip’ as one of your tools. Get it now:

sudo apt-get install unzip 

This will get you 3 folders; licenses, bin and webapps. Distribute as follows:

mv bin /opt/alfresco40c/ 
mv licenses /opt/alfresco40c/

mv web-server/endorsed/* /opt/alfresco40c/tomcat/endorsed 
mv web-server/shared/* /opt/alfresco40c/tomcat/shared
mv web-server/lib/* /opt/alfresco40c/tomcat/lib 
mv web-server/webapps/* /opt/alfresco40c/tomcat/webapps/

For your convenience, create a folder to store some database scripts:

mkdir /opt/alfresco40c/extras

Create the sql-script to create a database:

nano /opt/alfresco40c/extras/db_setup.sql

This file has the contents:

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

Create the sql-script to drop the database:

nano /opt/alfresco40c/extras/db_remove.sql

This file has the contents:

drop database alfresco; 
revoke all privileges, grant option from 'alfresco'@'localhost'; 
drop user 'alfresco'@'localhost';

Actually create an empty database + user:

mysql -u root -p </opt/alfresco40c/extras/db_setup.sql

Remind, you need your root password for this!

Create a file to start Alfresco:

nano /opt/alfresco40c/

Fill it with:

# Start or stop Alfresco server 
# Set the following to where Tomcat is installed 
cd "$ALF_HOME" 
# Set any default JVM values 
#export JAVA_OPTS='-Xms512m -Xmx1024m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m -server' 
export JAVA_OPTS='-Xms512m -Xmx768m -Xss768k -XX:MaxPermSize=256m -XX:NewSize=256m -server' 
export JAVA_OPTS="${JAVA_OPTS} -Dalfresco.home=${ALF_HOME}" 
if [ "$1" = "start" ]; then 
# if [ -r ./ ]; then 
# sh ./ 
# fi 
# if [ -r ./ ]; then 
# sh ./ 
# fi 
elif [ "$1" = "stop" ]; then 
# if [ -r ./ ]; then 
# sh ./ 
# fi 
# if [ -r ./ ]; then 
# killall soffice.bin 
# fi 

Make sure you can actually execute the script:

sudo chmod ug+x /opt/alfresco40c/

Provided you have valid, you should be able to start and stop Alfresco by entering:

cd /opt/alfresco40c
./ start


./ stop

Check if your action was successful by validating if the process is running (or has stopped. Remind, stopping Alfresco might take a while)

ps -ef |grep java

Goto http://the-ip-address:8080/alfresco or  http://the-ip-address:8080/share and see if your install was successful!

Have fun!

  • This tutorial does not fix you with an Alfresco that starts as your system starts, nor does it gently stop when your system stops. It can, see the Alfresco wiki.
  • Another thing is that Ubuntu does not allow you to use portnumbers below 1024 as a non-root account. Therefore you need some port-redirections as explained in Alfresco’s wiki.
  • Adding the Sharepoint integration AMP is something you need to do by hand. If there is enough demand, I might elaborate on that…

Your could look like (store in tomcat/shared/classes/

 ## Common Alfresco Properties #
 # Sample custom content and index data location
 # Sample database connection properties
 # External locations
 # Property to control whether schema updates are performed automatically.
 # Updates must be enabled during upgrades as, apart from the static upgrade scripts,
 # there are also auto-generated update scripts that will need to be executed. After
 # upgrading to a new version, this can be disabled.
 # MySQL connection
 # Oracle connection
 # SQLServer connection
 # Requires jTDS driver version 1.2.5 and SNAPSHOT isolation mode
 # Enable TCP protocol on fixed port 1433
 # Prepare the database with:
 # PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
 # Index Recovery Mode
 # Outbound Email Configuration
 # Alfresco Email Service and Email Server
# Enable/Disable the inbound email service. The service could be used by processes other than
 # the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.
# Email Server properties
# A comma separated list of email REGEX patterns of allowed senders.
 # If there are any values in the list then all sender email addresses
 # must match. For example:
 # .*\@alfresco\.com, .*\@alfresco\.org
 # Allow anyone:
 # The default authentication chain
 # To configure external authentication subsystems see:
# The password for the default principal (only used for LDAP sync)
 # URL Generation Parameters (The ${localname} token is replaced by the local server name)
# Default value of is which means 'listen on all adapters'.
# This allows connections to JMX both remotely and locally.
 # RMI service ports for the individual services.
 # These seven services are available remotely.
 # Assign individual ports for each service for best performance
 # or run several services on the same port. You can even run everything on 50500 if needed.
 # Select 0 to use a random unused port.

[update 10 feb 2012: (thanks @CristinaMartinR)]
For Postgress as a database and a sample file, take a look at

51 Responses to “Installing Alfresco (3.x, 4.x) on (32bit) Ubuntu”

  1. 1 Cristina January 9, 2012 at 11:16

    Great article! Thanks! 😀

  2. 2 Joel January 11, 2012 at 17:57

    Thanks for the tutorial
    I get to the login interface but I can’t login. I haven’t set any admin account during the installation process. What are the default credentials for the alfresco administrator?

  3. 5 Leonardo Silva January 12, 2012 at 17:58

    First of all, thank you for the article! Very nice!

    But, I’m facing some problems… after installing everything I just got an 404 error opening localhost:8080/alfresco.
    And opening localhost:8080/share I can see the login window but it doesn’t work properly. It says to me that either my login is incorrect or the remote server is down…

    Can you help me?


    • 6 Tjarda Peelen January 13, 2012 at 17:35

      Leonardo, Fred,

      Share needs Alfresco to be funny functional to authenticate. (You actually authenticate in Alfresco…)
      Could you please provide a log from Alfresco what he is complaining about? (Alfresco.log? stdout.log?)



      • 7 Leonardo Silva January 13, 2012 at 22:51

        Hi Tjarda,

        Thanks to you I managed to fix the issue. I didn’t realized about looking for the log before you asking for it.
        I found out I had a problem with port 50500, but I guess it was happening cause of some wrong config I made in that yielded in many treads of the java process that weren’t being finalized (Starting and stopping the server many times…).

        Actually, I had the problem first with the server in the lab I work at university. Then I tried to install in my personal pc. It worked here but I didn’t tried in the server yet. It is probably the same issue. I’ll have to make an upgrade there, may be a little harder, but I will come here for help!

        Thank you!

  4. 8 Fred January 13, 2012 at 16:32

    I got the same issue as Leonardo. 404 on alfresco, can’t login on share. Some help would be appreciated!

  5. 11 Rod January 15, 2012 at 15:17

    Hi Tjarda:

    I’m the one who started this thread via Twitter …
    I still got the same problem as before (the one the other people are experiencing, too), I will check the logs and keep an eye on this post.

    In the meantime I decided to start BitNami’s Alfresco stack, which works very well. Alfresco seems to have a lot of features for working in a team, it’s much more than a document management system.


    • 12 Tjarda Peelen January 15, 2012 at 17:37

      Hi Rond, thanks Cor the reply-by-blog! Is your problem also the port 50500?

      I agree Alfresco is much more than just a dms. Have fun using your Alfresco!


  6. 13 naren January 31, 2012 at 07:24

    The remote server may be unavailable or your authentication details have not been recognized please help me

  7. 15 naren January 31, 2012 at 07:50

    2012-01-31 12:34:56,177 INFO [] [http-8080-exec-149] Unable to retrieve License information from Alfresco: 404

      • 17 naren February 1, 2012 at 07:01

        not opened

      • 19 naren February 2, 2012 at 07:52

        12:34:17,051 INFO [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
        12:34:22,272 INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 312 Web Scripts (+0 failed), 322 URLs
        12:34:22,284 INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)
        12:34:22,284 INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
        12:34:22,541 INFO [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 5486.1943ms)
        12:34:22,554 INFO [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
        12:34:22,559 INFO [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
        12:34:30,008 INFO [] Unable to retrieve License information from Alfresco: 404
        12:35:32,207 INFO [] Unable to retrieve License information from Alfresco: 404
        12:35:32,261 INFO [] Unable to retrieve License information from Alfresco: 404

        • 20 Gerd July 27, 2012 at 21:50

          I experienced a similar issue installing 4.0d CE. The reason for the licence thing is, that alfresco is just not working. the reason for that – in my case – was a problem realed with the keystore (new in 4.0). I found the sollution here:

          Thank you for your greate work in this post!

  8. 21 naren February 1, 2012 at 07:04

    can this work in postgres-8.1.4 and can help for installation of it

  9. 23 Jeremy May 18, 2012 at 08:17

    You Rock!! This is a great How-To.
    The Alfresco Community Edition 4.0d auto installation is completely broken. Could not get it to work.
    Your instructions worked perfectly the 1st time!
    Thanks for writing this up.

  10. 25 Homemade Hot Chocolate May 30, 2012 at 20:29

    Great post. I was checking continuously this blog and I am inspired! Very useful information specially the remaining part 🙂 I handle such information a lot. I used to be seeking this particular info for a very long time. Thank you and good luck.

  11. 26 ardianrdian July 5, 2012 at 16:47

    Hi I am having the problem with the login, I tried the 64 bit autoinstaller on a 64bit linux machine, same problem. this is a different machine and I am having the same login problem I am doing something wrong.

    Here’s my log

    Please help.

    • 27 Tjarda Peelen July 8, 2012 at 00:19

      See line 11/12 of your log. Your connection credentials are wrong. Alfresco cannot connect to your database. Please see tomcat/shared/classes/ and revisit your database username, password, portnumber and database name & driver…

  12. 28 ardianrdian July 5, 2012 at 17:18

    Ps. In this one I am using the 32 bit.

  13. 29 Ozlem July 6, 2012 at 16:33

    Dear Tjarda,

    I did set the alfresco up 3 times but nothing changed at the end, when I tried to log in to Alfresco, Im getting

    ” the remote server may be unavailable or your authentication details have not ben recognized ” message,

    I searched this message alot, and tried to solve it, but nothing changed yet.

    Could you please help me, no more patience left 😦

    if u prefer , we can even connect via teamviewer etc..

    Thank you

  14. 35 September 19, 2012 at 09:32

    Dear Tjarda,
    you rocks! It is working for me, but only a comment. In the 3th comment of the post, where you show the username and pass for the main user, you write user=asdmin. I’ve been trying it and it doesn’t work, it is admin. I think is a type error.
    Thanks again and sorry about my English!

  15. 39 Adam October 12, 2012 at 14:34

    I’m having an issue with my install, been through and tried the solutions above, however still cannot log in to port 8080. Here is my log;

    12:12:02,532 WARN [] Legacy configuration detected: adding classpath*:alfresco/enterprise/cache/ to global-properties definition
    12:12:20,634 WARN [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
    at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(

    (( Cut out most of the log. See pastebin in next post – Tjarda. Interesting part is:))

    Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(

    ((Removing the remainder too – Tjarda))

  16. 40 Adam Rees October 12, 2012 at 14:37

    Sorry for the spam post, here is my log on pastebin;

    • 41 Tjarda Peelen October 12, 2012 at 20:21

      Hi Adam,

      It seems to me that the system tries to start up using Postgres as a database (indocated by line in your log “Caused by: org.postgresql.util.PSQLException:…”

      Is that your intention? If you follow my post I install MySQL, and configure the accordingly. If you want to use Pstgress, follow the instructions in the official documentation ( You need to manually install Postgress, and configure to use the correct connection string/credentials, and create an empty database in Postgres. In order to do so you need the database driver of course, but I guess that is part if the standard package these days….

      I hope this helps you furhter!


      PS: Deleted the full in-post stacktrace message, since you included a link to pastebin anyway

  17. 45 Adam Rees November 20, 2012 at 10:56

    mysql-connector-java-5.1.22-bin.jar This connector is in the appropiate location. I noticed that it is a later version than the one used in this example.

  18. 46 nadia January 12, 2013 at 05:04

    hi ! i have an error at the end :

    cd /opt/alfresco40d
    ./ start

    when i do ……. -) ./ start
    ./ ligne 5 : cd: /opt/alfresco40d : Aucun fichier ou dossier de ce type (no files or folder of that type….)
    ./ ligne 21: Erreur de syntaxe près du symbole inattendu « elif »
    ./ ligne 21: `elif [ “$1” = “stop” ]; then ‘

    error of synthax near of « elif »

    can you help me?

    i have install the alfresco40d on Ubuntu


  19. 48 olfa April 8, 2013 at 12:52

    Thanks for the tutorial
    i have some probleme, i have to install 2 vmware one contain alfresco and other contain date base
    can you help me to do it ? thanks

    • 49 Tjarda Peelen April 10, 2013 at 14:35

      Good question, but a bit out of scope for the topic at hand right? Some pointer: look at the database properties in is your friend…

      • 50 olfa April 10, 2013 at 16:22

        thanks, I am new to alfresco and I have been scouring these forums for the last few weeks looking for how can i understand “ALFRESCO” because i have to develop GED using ALFRESCO platform and the first step is to simulate alfresco with using 2 vmware one contain alfresco application and second the date base (architecure 2-tiers) but 😦 i don’t know where can i finf date base of alfresco and …. and how connect the 2 vmware ???

      • 51 olfa April 12, 2013 at 07:02

        when the process is running i had this error
        “HTTP Status 404 – /share

        type Status report

        message /share

        description The requested resource is not available.
        Apache Tomcat/7.0.39”

Comments are currently closed.