Installing Labs 3 Stable on Debian Etch

Showing results for 
Search instead for 
Did you mean: 

Installing Labs 3 Stable on Debian Etch

0 0 3,921

Obsolete Pages{{Obsolete}}

The official documentation is at:

Install JAVA

In order to install Java 6 on Debian Etch you need to edit your apt sources. As Java 6 is not stable in Debian Etch we solve this issue with apt pinning:

APT Pinning
(Edit all lines marked as bold)

1. Edit your /etc/apt/sources.list

deb etch main non-free
deb-src etch main non-free

deb etch/updates main contrib non-free
deb-src etch/updates main contrib non-free

deb etch main
deb etch main

### unstable #######
deb unstable main non-free

2. Add a line to /etc/apt/apt.conf.d/70debconf

// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {'/usr/sbin/dpkg-preconfigure --apt || true';};
APT::Cache-Limit '100000000';

3. Create /etc/apt/preferences

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=unstable
Pin-Priority: 600

4. Install Java 6 JDK

apt-get update
apt-get install sun-java6-jdk

Make sure the Java files are installed to /usr/lib/jvm/java-6-sun/.

Install ImageMagick

Make sure ImageMagick is installed on the system:

apt-get install imagemagick

Install swftools

As there is no .deb package for swftools available which fits to the package configuration of Debian you have to compile swftools yourself. Download to your system.


After you downloaded the version untar it.

tar -xzf swftools-2009-02-07-1827.tar.gz

Before compiling the sources you need a few dev packages:

apt-get install libjpeg62-dev libfreetype6-dev libpng3-dev libt1-dev libungif4-dev

If you are running Red Hat based distros its:

sudo yum install install libjpeg-devel libfreetype-devel libpng-devel libt-devel libungif-devel

After you installed these packages cd into the swftools directory and run


Please take a closer look at the protocol. This protocol will state if there is any library missing. If you are missing one or more libraries take the name of it and search for this library

apt-cache search lib name

If you found the library install the -dev package of this library and re-run the configure script. Take a look at the protocol once again. If there is no missing file continue compiling and installing the package.

make install

After that you should be able to run pdf2swf by typing

pdf2swf -V

Installing Openoffice for headless use

(Please notice the following description Headless)

First of all install xvfb for running X11 programs in a terminal environment.

apt-get install xvfb xfonts-base

Make sure you can start xvfb by typing

Xvfb :1 -screen 0 1024x768x24 -fbdir /usr/src &

After that start installing OpenOffice

apt-get install

After installing OpenOffice you should try to run Openoffice

soffice '-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager' -nofirststartwizard -nologo -headless -display :1 &

If an error occurs feel free to use the link above to disable the manual registration of OpenOffice.

Installing Alfresco

Donwload Alfresco Labs 3 Stable. Go to your home directory or to a tmp directory and type


Please note that it can be useful to download the software by heading to the homepage of Alfresco and follow the links for the latest Community labs edition.
After you downloaded the file install Alfresco by typing

chmod +x Alfresco-Labs-3Stable-Linux-x86-Install
./Alfresco-Labs-3Stable-Linux-x86-Install --mode console

Try to install Alfresco in /opt/Alfresco and answer any other questions with Y.

64 bits setup

If you are running a x64 kernel, you should consider installing the 'ia32-libs' package in order to run the Alfresco installer in console mode.

apt-get install ia32-libs

If not, the installer will simply not run without returning any error. (Tested with lenny x64 under OpenVZ)

Then follow the standard setup instructions.

Editing Alfresco Files

First of all edit the startup file for Alfresco. Use your favourite editor to do that.

joe /opt/Alfresco/

Find the line for ALF Home Dir and Java Home and edit it to

# Start or stop Alfresco server
# Set the following to where Tomcat is installed
cd '$ALF_HOME'
export JAVA_HOME='/usr/lib/jvm/java-6-sun'
# Set any default JVM values
export JAVA_OPTS='-Xms128m -Xmx512m -XX:MaxPermSize=128m -server'

After that edit the corresponding lines in

joe /opt/Alfresco/

# Start or stop Alfresco server
# Set the following to where Tomcat is installed
cd '$ALF_HOME'
export JAVA_HOME='/usr/lib/jvm/java-6-sun'

First start

Now you have to start Alfresco. There will be several errors but by starting the application the war archive will be extracted to its final destination. So the following changes will be made directly to the working instance of Alfresco.

/opt/Alfresco/ start

Wait a few minutes until java will stop consuming much CPU. Then stop Alfresco again.

/opt/Alfresco/ stop

You need to change the ImageMagick and pdf2swf paths in your configuration file.

joe /opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/

Replace the corresponding lines with the following lines at the end of file:



SMB/CIFS Configuration

Make sure you know the hostname, the domain and the broadcast address. Fill in these information in the

joe /opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/

INIT Scripts

To get Alfresco starting while booting up you will need to create an init script. The following init script starts alfresco and routes port 8080 to the external http port 80. Additonally, the init script runs Openoffice, due to an unresolved problem with the standard Alfresco Openoffice configuration. If you have any other webserver running on your server just delete the iptables entries.

joe /etc/init.d/alfresco

#! /bin/sh
# /etc/init.d/alfresco

# Start/Stop Script
export PATH=$PATH:/usr/local/bin/pdf2swf
case '$1' in
   Xvfb :1 -screen 0 1024x768x24 -fbdir /usr/src &
   /opt/Alfresco/ start
   xvfb-run -a /usr/lib/openoffice/program/soffice.bin -headless -accept='socket,port=8100;urp;' -display :1 &

   iptables -F
   iptables -t nat -F
   iptables -P INPUT ACCEPT
   iptables -P FORWARD ACCEPT
   iptables -P OUTPUT ACCEPT
   iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
   /opt/Alfresco/ start
   /opt/Alfresco/ stop
   /opt/Alfresco/ stop
   echo 'Usage: /etc/init.d/alfresco {start|stop}'
   exit 1

exit 0

To read more about init scripts follow this link init scripts

chmod +x /etc/init.d/alfresco
update-rc.d alfresco defaults

After rebooting the machine the Alfresco system should be reachable on HTTP Port 80.
Please check the logs under /opt/Alfresco/alfresco.log if there are any further errors.
Labs 3