Alfresco basic installation
What is Alfresco?
Alfresco is an enterprise content management system for Microsoft Windows and Unix-like operating systems. Alfresco comes in two flavours. Alfresco Community Edition is free software, LGPL licensed open source and open standards. Alfresco Enterprise Edition is commercially & proprietary licensed open source, open standards and enterprise scale. Its design is geared towards users who require a high degree of modularity and scalable performance.
Alfresco, at its core, is a general purpose content repository with content management services. It can be used to manage all your business documents and transform them in web-ready formats (HTML, PDF) and categorize them linking into overall site navigation and index pages.
Did he say, manage all your business documents and transform them into web-ready formats? That’s what I’m looking for.
I’m going to install one for me to see what it really offers.
All installation must be done as root. Otherwise you have to do a sudo on each command.
# sudo su
After installing your linux server for Alfresco. You have to upgrade it. I mean, you have to download and install all the fixes for your linux version.
# apt-get upgrade
Install all the Alfresco pre-requisite
# 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
Add your JAVA_HOME settings in your System-wide environment viriables. This will enable all users to use the JAVA environt when they login into the system. Edit the environment file and add JAVA_HOME=”/usr/lib/jvm/java-6-sun/” at the end of the line
# vi /etc/environment
To use the newly added environment variable, it’s either you have to logout and login again so that the JAVA environment variables will be added into your session or reload the System-wide environment. I prefer to reload the environment variables without re-login.
# source /etc/environment
After installing the pre-requisite applications now, Alfresco installation.
I prefer to install 3rd party application in /opt to separate the linux application from other application. This helps me in managing and administration.
# makdir -p /opt/alfresco/33G
Have to change the permission of the newly created folder for alfresco_user.
# chown -R alfresco_user:alfresco_user /opt/alfresco
Download alfresco using alfresco_user
$ cd ~
$ mkdir download
$ cd download
$ wget http://dl.alfresco.com/release/community/build-2860/Alfresco-Community-3.3g-Linux-x86-Install?dl_file=release/community/build-2860/Alfresco-Community-3.3g-Linux-x86-Install
Change Alfresco’s permission and Install
$ chmod 744 Alfresco-Community-3.3g-Linux-x86-Install.bin
Follow the installation procedure
After the installation, run alfresco for the first time.
$ cd /opt/alfresco/33G
Check Alfresco log for error.
$ tail -f alfresco.log
Running good… good… Error! Error!
ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker] ImageMagickContentTransformerWorker not available: 06130000 Failed to perfo rm ImageMagick transformation:
command: [/usr/local/bin/convert, /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_init_source_5931186726648279134.gif, /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_init_target_339515008452978855.png]
exit code: 1
err: Cannot run program “/usr/local/bin/convert”: java.io.IOException: error=2, No such file or directory
16:06:05,588 ERROR [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] Failed to start a runtime executable content transformer:
command: [/opt/alfresco/bin/pdf2swf, -V]
exit code: 1
err: Cannot run program “/opt/alfresco/bin/pdf2swf”: java.io.IOException: error=2, No such file or directory
The error is “Cannot run program /usr/local/bin/convert”. Checking if the file really exist, Alfresco’s right. There’s no convert in /usr/local/bin.
We have to find (It’s better if we find the missing file as root) those applications and fix it according to Alfresco’s configuration. First problem is convert.
$ sudo find / -name convert -print
Found it! It’s in /usr/bin and not in /usr/local/bin, as per Alfresco’s configuration.
We will going to fix it by creating a link from /usr/bin to /usr/local/bin so that Alfresco can detect it.
$ sudo ln -s /usr/bin/convert /usr/local/bin/convert
Do the same for converter and pdf2swf
Restart Alfresco and check for error
$ cd /opt/alfresco/33G
$ tail -f alfresco.log
Looks good eh! Seeing Alfresco started without error.
Wait! Wait! I saw some warning on JVM.
18:11:31,144 INFO [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM – v1.6.0_20-b02; maximum heap size 494.938MB
18:11:31,144 WARN [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM – WARNING – maximum heap size 494.938MB is less than recommended 512MB
Ok! Ok! We will fix it too.
We have to expand the JVM memory to solve this warning. Go to Alfresco install home, in my installation it’s in /opt/alfresco/33G, and edit the alfresco.sh file, and modify the JAVA_OPTS:
export JAVA_OPTS=’-Xms128m -Xmx512m -XX:MaxPermSize=128m -server’
export JAVA_OPTS=’-Xms256m -Xmx1024m -XX:MaxPermSize=512m -server’
Restart Alfresco again.
18:32:17,312 INFO [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM – v1.6.0_20-b02; maximum heap size 989.875MB
Very good! Whew!
Now, log-in to Alfresco from your favorite browser:
Log-in as admin, depends on what account/password you define during your installation. In my case, it’s:
That’s it for now. Next time we will configure alfresco with Active Directory.