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

Want to support HowtoForge? Become a subscriber!
 
Submitted by inflate (Contact Author) (Forums) on Wed, 2010-06-02 15:56. :: Ubuntu | Other

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


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Alex (not registered) on Fri, 2010-12-31 16:15.

I just followed this procedures, and got the 404 message, then upon a little more research, one of the most critical part of the install is "NOT" to install tomcat prior to the installation of Alfresco. 

So either remove Tomcat or make sure Tomcat was not installed during the ubuntu installation, then proceed as instructed.

 Great job on the write up.

 

Submitted by rise_mini (not registered) on Tue, 2010-12-14 09:51.

I have installed Alfresco on Ubuntu 10.04 and it is running successfully. The process that I had followed are mentioned in the below given link -

http://knowledgebreeze.blogspot.com/search/label/Alfresco

Submitted by snarf77 (not registered) on Fri, 2010-09-03 13:36.

Hi,

first of all : great job for this  how to...

Nevertheless I got an error when trying to start alfresco (chapter 9.3):

>>root@GED:/opt/alfresco# bash ./alfresco.sh start
>>./alfresco.sh: line 12: ./tomcat/bin/startup.sh: Permission non accordée

Sorry for the french: Permission non accordée = Permission denied

I ran everything as root  as described in this how to so how can I get permission problem ?

Thanx for you help

 

Submitted by jamg (not registered) on Fri, 2010-08-27 17:12.

It works!!

 CIFS is working!

 Great how-to, man

Submitted by dkenned (not registered) on Tue, 2010-08-17 21:55.
This procedure works!  I don't know how much time it took you to document this procedure, but it was worth it.  I was familiar enough with Linux to get myself through it, and as far as I'm concerned, it was just what I needed (along with the first two pages of 'perfect server').  I am half tech, half business person; so I have to wonder why there isn't an automated install of Alfresco for Ubuntu 10 (either desktop or server).  When I finally finished carefully following your procedure, I booted a Windows XP machine, launched Firefox, and entered the URL (I used IP address instead of server name) for Alfresco DMS not really expecting to connect but -- wallah -- not long afterward, there was the Alfresco home page!  Same for Share.  I have to think it will be downhill from here.   Thanks again! (BTW, my server platform is the likes of a netbook:  ZOTAC IONITX-G-E Intel Atom 330 (1.6Ghz dual-core) NVIDIA ION Mini ITX mobo combo from newegg.com.  Not fast, but I'm just taking Alfresco for a test drive; I don't think this would remain my server platform.)
Submitted by MocArt (registered user) on Thu, 2010-08-05 01:57.

I installed alfresco from this guide, but can't start it, if i see "top" i can`t see proccess named "alfresco". If i start it:

root@srv:/opt/alfresco# bash alfresco.sh start

Using CATALINA_BASE: /opt/alfresco/tomcat

Using CATALINA_HOME: /opt/alfresco/tomcat

Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp

Using JRE_HOME: /usr/lib/jvm/java-6-sun/

root@srv:/opt/alfresco#

please help me!

Submitted by MocArt (registered user) on Thu, 2010-08-05 01:55.

I installed alfresco from this guide, but can't start it, if i see "top" i can`t see proccess named "alfresco". If i start it:

root@srv:/opt/alfresco# bash alfresco.sh start
Using CATALINA_BASE:   /opt/alfresco/tomcat
Using CATALINA_HOME:   /opt/alfresco/tomcat
Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp
Using JRE_HOME:       /usr/lib/jvm/java-6-sun/
root@srv:/opt/alfresco#

please help me!

Submitted by col (not registered) on Fri, 2011-05-27 09:14.

I have same problem. Rather than just install the first two pages from 'the perfect server' I followed the whole install upto and including the installation of ISPConfig3. I then followed the install procedure for alfresco here. When I goto the address the browser returns page not found.

Not sure what hte problem is and I don't know enough about linux to debug it.

Can anyone help? 

Submitted by Bob Gustafson (not registered) on Sat, 2010-07-31 17:49.

Under 5, the configuration directory for mysql is shown as /etc/mysql/my.cnf

On Fedora 13, it is /etc/my.cnf

Submitted by DoctorScott (not registered) on Sun, 2010-07-25 06:03.

Great install guide. Thanks for making it so easy! Two quick comments / questions.

1. Isn't is the best practice to run things like Alfresco as a user other than root?  As the instructions are written, everything is owned by root. Wouldn't it be better to create an alfresco user and group and launch the server using that user?

 2.  Any hints or tips about creating an initialization script so Alfresco starts automatically at boot up? I've seen other guides for older versions of Alfresco and older Ubuntu versions that include suggested /etc/init.d/alfresco scripts. Would certainly be helpful to have that stuff included in your HowTo guide.

Thanks again for the strong work!

-Scott

Submitted by srinivasmurty (registered user) on Fri, 2010-07-16 19:26.

Unfortunately, I was trying to use "wget" to download Alfresco Community 3.3g to  my Ubuntu 10.04 server. I was using the following link with the appropriate "wget -O" option as given in the post:

http://process.alfresco.com/ccdl/?file=release/community/build-2860/alfresco-community-tomcat-3.3g.tar.gz

The problem is that this link takes you to a page that shows two options: 1. Standard Download and 2. A Bittorent download. So my command from the command line fails with a 404 error where, obviously, if I click on the Standard Download button (I can't , the download happens on my browser. Unfortunately, my server version does not have X-Windows or a window manager running to I am trying to run everything off of the command line. Please let me know if you have a suggestion on how I can do this.

Submitted by Larry (not registered) on Fri, 2010-07-09 22:04.
Install worked perfectly on my server - but I want the records mgmt module to be included.  Any ideas? Thanks!
Submitted by Dejan (not registered) on Sat, 2010-06-19 19:38.
http://dl.alfresco.com/release/community/build-2860/alfresco-community-tomcat-3.3g.tar.gz?dl_file=release/community/build-2860/alfresco-community-tomcat-3.3g.tar.gz
Submitted by ubundom (not registered) on Wed, 2010-06-09 00:33.

@inflate: first rate! Thanks.

I had a couple of gotchas: first I had to upgrade from 9.10 to 10.04 which trashed my sun-java6-jdk. I managed to sort this referring to http://happy-coding.com/install-sun-java6-jdk-on-ubuntu-10-04-lucid/comment-page-1/#comment-343.

Also, for those of us who are doing the install over ssh remotely on to a headless server without X11, I have referred to  http://souptonuts.sourceforge.net/sshtips.htm My ~/.ssh/config looks a bit like this:

Host RemoteAlfrescoServer
HostName xxx.xxx.xxx.xxx
        User alfuser
        Port 2200
        LocalForward 20080 localhost:8080

The xxx.xxx.xxx.xxx and alfuser need to be altered to the correct entries and others may choose to forward ssh traffic over the standard port 22. And now I can locally set up an ssh tunnel to the Alfresco server:

ubundom@home$ ssh -N -f -q  RemoteAlfrescoServer

 

And hence I can safely surf with my local GUI browser to the RemoteAlfrescoServer over ssh thus:

http://localhost:20080/alfresco

 

Submitted by Bryan G (not registered) on Mon, 2010-06-07 15:55.

Part 8., Step 3. Sharepoint configuration:

vti.alfresco.alfresoHostWithPort=http://192.168.1.1:8080

should be:

vti.alfresco.alfrescoHostWithPort=http://192.168.1.1:8080
 

Thanks,

BG

Submitted by inflate (registered user) on Tue, 2010-06-08 10:15.

No, it wasn't a typo, the line is correct. But after some search I found that this options is deprecated and not needed anymore.

I just made a test without the:

vti.alfresco.alfresoHostWithPort=http://192.168.1.1:8080

And it worked fine.

I had copied the lines from an old installation I had before.

Thanks & Regards,

Submitted by darren (not registered) on Thu, 2011-01-20 13:29.

port 8080 is not functioning with me, I am using linksys router and hub. Is there any problem with my configuration?

Submitted by Bryan G (not registered) on Mon, 2010-06-07 15:42.

Under Part 8. Alfresco configuration, step 1. Basic configuration: The first part of the script refers to "dir.root=", and the second part has it changed to "root.dir=".  Is this a typo?  Please advise.

Thanks.

Submitted by accrobyte (not registered) on Tue, 2010-06-08 11:10.

Yes is TYPO

cheers

Thanks for this tut finally managed to make it work on lucid lynx Good job!!!

Submitted by Bryan G (not registered) on Wed, 2010-06-09 19:00.
Yes -- awesome job.  Following this guide also worked perfectly on Karmic.
Submitted by inflate (registered user) on Tue, 2010-06-08 09:59.

Hi,

Yes it was a type, but the strange thing is that both work!

Submitted by Anonymous (not registered) on Sat, 2011-01-15 21:13.

In order to install java jdk

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

 in order to install swftools

dpkg -i /path/to/packagename

http://mirrors.us.kernel.org/ubuntu//pool/universe/s/swftools/swftools_0.9.0-0ubuntu1_amd64.deb

 adding home directoryfor java_home

sudo bash -c "echo JAVA_HOME="/usr/lib/jvm/java-6-sun/" >> /etc/environment"

 Everything worked for me. thank you..