How To Install Alfresco Community 3.3 On Ubuntu Server 10.04 (Lucid Lynx)

This guide explains how to install Alfresco Community 3.3 on Ubuntu Server 10.04 (Lucid Lynx).

From Alfresco wiki: Alfresco is the Open Source Alternative for Enterprise Content Management (ECM), providing Document Management, Collaboration, Records Management, Knowledge Management, Web Content Management and Imaging.

 

1. Installing Ubuntu Server 10.04

You'll need a fresh installation of Ubuntu Server 10.04. You can find a detailed installation guide here The Perfect Server - Ubuntu 10.04, follow steps in page 1 and page 2.

 

2. Notes

  • You need to enable 'partner' repository in /etc/apt/sources.list. Otherwise the required package sun-java6-jdk will not be installed.
  • I'm using dms.example.lan as the hostname.
  • The following IP address is used for the server: 192.168.1.1/255.255.255.0
  • Please replace the above points with your current settings.

 

3. Required dependencies

As root run the following command to install the required packages:

root@dms:~# apt-get install mysql-server sun-java6-jdk imagemagick swftools openoffice.org-core openoffice.org-java-common openoffice.org-writer openoffice.org-impress openoffice.org-calc

 

4. Configuring JAVA_HOME variable

Edit /etc/environment and add the following to it:

JAVA_HOME="/usr/lib/jvm/java-6-sun/"

After saving the file, it's recommended that you logout and then login again so bash will read the JAVA_HOME variable.
If you don't want to logout/login you can run the following command to make sure that the variable will be available in your current session:

root@dms:~# source /etc/environment

 

5. Change MySQL default character set

You can skip this section if you don't want to use UTF-8 as your default character set or your language doesn't require it.

If you use a complex language that requires UTF-8 like arabic, farsi, hebrew, etc... You'll need to force UTF-8 support in mysql, otherwise any document with a title written in e.g. arabic language will appear as ???????

Edit /etc/mysql/my.cnf and add the following under [mysqld]:

[mysqld]
#
# * Basic Settings
#
#
# * IMPORTANT
#   If you make changes to these settings and your system uses apparmor, you may
#   also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#
default-character-set = utf8

Restart mysql:

root@dms:~# /etc/init.d/mysql restart

 

6. Database setup for Alfresco

1. Log into MySQL using mysql's root and your password:

root@dms:~# mysql -u root -p

2. Create database:

mysql> CREATE DATABASE alfresco DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL PRIVILEGES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';
mysql> GRANT SELECT,LOCK TABLES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';
mysql> FLUSH PRIVILEGES;
mysql> quit;

 

7. Download and install Alfresco

1. I'm going to install Alfresco inside /opt/alfresco but you can install it in any other place you like.

root@dms:~# mkdir -p /opt/alfresco

2. Download and extract Alfresco:

root@dms:~# cd /opt/alfresco
root@dms:/opt/alfresco# wget http://dl.alfresco.com/release/community/build-2765/alfresco-community-tomcat-3.3.tar.gz?dl_file=release/community/build-2765/alfresco-community-tomcat-3.3.tar.gz -O alfresco-community-tomcat-3.3.tar.gz
root@dms:/opt/alfresco# tar zxvf alfresco-community-tomcat-3.3.tar.gz
root@dms:/opt/alfresco# rm -f alfresco-community-tomcat-3.3.tar.gz

 

8. Alfresco configuration

We need to configure Alfresco by editing: alfresco-global.properties

root@dms:/opt/alfresco# nano /opt/alfresco/tomcat/shared/classes/alfresco-global.properties

1. Basic configuration

Change the following options from:

###############################
## Common Alfresco Properties #
###############################
#
# Sample custom content and index data location
#-------------
dir.root=./alf_data
#
# Sample database connection properties
#-------------
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
#
# External locations
#-------------
#ooo.exe=soffice
#ooo.enabled=false
#img.root=./ImageMagick
#swf.exe=./bin/pdf2swf

to:

###############################
## Common Alfresco Properties #
###############################
#
# Sample custom content and index data location
#-------------
dir.root=/opt/alfresco/alf_data
#
# Sample database connection properties
#-------------
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
#
# External locations
#-------------
ooo.exe=/usr/lib/openoffice/program/soffice
ooo.enabled=true
img.root=/usr
swf.exe=/usr/bin/pdf2swf
    

Please note: If you created alfresco database without using the same values showed in section 6 of this tutorial, please update the information here, otherwise Alfresco will not be able to connect to the database.

2. CIFS support

If you want to be able to access the documents stored in Alfresco through CIFS shares (AKA Windows Shares) you need to add the following in the end of the configuration file:

#
# CIFS Support
#------------------------
cifs.enabled=true
cifs.serverName=dms
cifs.ipv6.enabled=false
cifs.tcpipSMB.port=1445
cifs.netBIOSSMB.namePort=1137
cifs.netBIOSSMB.datagramPort=1138
cifs.netBIOSSMB.sessionPort=1139

3. SharePoint Support

If you're looking to open documents stored in Alfresco directly from MS Office, you'll need to enable SharePoint protocol.
The SharePoint protocol support didn't come with Alfresco by default, we will need to download the module and install it manually.

root@dms:~# cd /opt/alfresco/amps
root@dms:/opt/alfresco/amps# wget -c http://dl.alfresco.com/release/community/build-2765/vti-module.amp?dl_file=release/community/build-2765/vti-module.amp -O vti-module.amp
root@dms:/opt/alfresco/amps# cd ..
root@dms:/opt/alfresco# bash apply_amps.sh

Also, in the end of the configuration file (alfresco-global.properties), please add the following:

#
# Sharepoint
#-------------
vti.server.port=7070
vti.alfresco.deployment.context=/alfresco
vti.alfresco.alfresoHostWithPort=http://192.168.1.1:8080
vti.share.shareHostWithPort=http://192.168.1.1:8080

Please note: Change the IP 192.168.1.1 to your server's IP.

 

9. Starting Alfresco

1. Start OpenOffice.org as a Service:

root@dms:~# /usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &

Alfresco should be able to run OpenOffice.org as a service without human interaction, but this didn't happen with me. Alfresco failed to run it, so I run it by hand as a workaround.

2. Update firewall rules to allow access to Alfresco CIFS shares.

root@dms:~# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 445 -j REDIRECT --to-ports 1445
root@dms:~# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 139 -j REDIRECT --to-ports 1139
root@dms:~# iptables -t nat -A PREROUTING -p udp -m udp --dport 137 -j REDIRECT --to-ports 1137
root@dms:~# iptables -t nat -A PREROUTING -p udp -m udp --dport 138 -j REDIRECT --to-ports 1138

3. Start Alfresco:

root@dms:~# cd /opt/alfresco
root@dms:/opt/alfresco# bash alfresco.sh start

 

10. Testing

  • To access Alfresco DMS type in your browser: http://192.168.1.1:8080/alfresco
  • To access Alfresco Share type in your browser: http://192.168.1.1:8080/share
  • Login with username: admin Password: admin
  • From a Windows machine, try to access CIFS share by going to Start --> Run then type: \\dms\alfresco
  • To know how to use SharePoint protocol from MS Office, please follow the instructions in this document Managing Alfresco Content from within MS Office

 

11. References

Share this page:

22 Comment(s)