Install Alfresco Community 4.2 on Ubuntu 12.04 (Fixed)


This document shows how to install Alfresco 4.2 on an Ubuntu 12.10 system.  (This is an update to my prior document that had a few issues that prevented some parts of alfresco from working correctly...  Mainly renditions and thumbnails)

I am creating a virtual server for this that has 3.75 GiB of Memory

Installing Java 7

Here are the commands to install Java 7 from Ubuntu 12.04 server.

sudo apt-get purge openjdk*
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
java -version

Install Tomcat 7 ( a lot of this was derived from

    • Download tomcat 7 to the local directory  (this address could change see [2])



Extract the file

tar xvzf apache-tomcat-7.0.35.tar.gz

Move the tomcat over

sudo mv apache-tomcat-7.0.35 /opt/tomcat

Now set up the tomcat users.

sudo vi /opt/tomcat/conf/tomcat-users.xml

Add the following lines within the <tomcat-users> element  (of course change the password to your own password)

<role rolename="manager-gui"/>

<role rolename="admin-gui"/>

<user name="admin"   password="password"

roles="admin-gui, manager-gui,

manager-script, admin-script" />


Fix the connector,

sudo vi +70 /opt/tomcat/conf/server.xml


And add this to the connector


Set up start up script

sudo vi /etc/init.d/tomcat


Then place the following in it.  (adjust the jvm to the directory you have it in)


# Tomcat auto-start


# description: Auto-starts tomcat

# processname: tomcat

# pidfile: /var/run/


export JAVA_HOME=/usr/lib/jvm/java-7-oracle

case $1 in


sh /opt/tomcat/bin/



sh /opt/tomcat/bin/



sh /opt/tomcat/bin/

sh /opt/tomcat/bin/



exit 0



Make it executable

sudo chmod 755 /etc/init.d/tomcat

Add it to autostart

sudo update-rc.d tomcat defaults

Reboot to test auto start of tomcat

sudo reboot now


Now open up a web browser  (of course use your IP address, domain name)



You Should see…


Change memory settings for tomcat


sudo vi /opt/tomcat/bin/


Add the following line

This gives it 2GiB to use, you may need to change it to your system