cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



InstallationCentosLinux
3.2r2


A few important words


This document borrows heavily from an excellent wiki post located at the following url:

http://wiki.alfresco.com/wiki/Installing_Alfresco_Community_3.2r_WAR_on_Centos_5.4

which was based on:

http://wiki.alfresco.com/wiki/Installing_Alfresco_Community_3.2_WAR_on_Centos_5.3

I had difficulty installing the GUI way on Centos described in the Alfresco docs. After hitting bugs and checking the forums for solutions (which I found, awesome forums!) I decided to thy the 'longer' way. Maybe Centos 5.4 is too new for the install and docs. If you use this article I wish you the best of luck. If you find mistakes or updates, please take a few minutes to register (quick and easy) and update this doc please. Alfresco has gone through the trouble of giving this awesome software away, the least we can do it help support it. BTW, this doc as I'm writing it is current as of 2010.03.27.

The point of this Article is to update it based on the latest release of Alfresco which at this time is 3.2r2 and link to any new rpms. For example, there is now an rpm for swftools 0.9.0 so there isn't a need to built it. This eliminates the need for the gcc compile tools. Fewer steps; quicker install. I've also eliminated the [root@server ~]# in front of the commands so you can copy/paste to command line.

Thanks goes to:


  1. Alfresco team for creating Alfresco and opensourcing the project -- YOU ROCK!!
  2. the original group of wiki contributors, who made this revision possible.

Getting started


Caution! The following instructions require root access. Please be
cognizant that you could negatively affect your system due to inadvertent
commands. Mind what you type!!


Documentation Approach


This documents presents the actual steps which were necessary to install Alfresco Comunity 3.2r2 war on a freshly installed CentOS 5.4 i386 server installation. The CentOS 5.4 installation was completed onsite through a GUI install. Only major changes were using a Static IP, turning off firewall and SELinux. Unlike the wiki page this article is heavily based on, Alfresco is being installed on a Centos 5.4 32-bit system with default GUI (XWindows). However, everything will be done via command line as was done in the previous article.

The following is the plain commands entered, some relevant output presented by those and required input by the user. When file edits are necessary only the respective lines are shown with the required text. Sometimes existing lines have to be replaced by the text presented here. Some times new lines have to be added. To give reference to the location of the new lines one line before has been included in the text here.

Commands are enclosed in a the mediawiki code tags so you can copy many lines at once to paste in the command line. It looks like this:


yum update


Keyboard input is indicated by

<enter>

Long lines are wrapped by a backslash

\

Text ommited, e.g. from files or output is indicated by

...

Interactive application prompts, e.g. mysql, are indicated by

mysql> 

Comments for further actions or reviews are indicated by

#
# Do this or that...
#

Installation Steps


Remove packages we won't need, it shouldn't hurt to leave it, but just in case.

rpm -e --nodeps java-1.6.0-openjdk java-1.6.0-openjdk-devel 

Install DAG repository:


To find the current rpmforge install go to the main page:

http://dag.wieers.com/rpm/FAQ.php

Otherwise this is what was used:

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 

Update your system and get the latest package list:

yum update

Install prerequisites (Tomcat, OpenOffice, MySQL, ImageMagik)

yum install tomcat5 tomcat5-common-lib tomcat5-jasper tomcat5-jsp-2.0-api tomcat5-server-lib tomcat5-servlet-2.4-api openoffice.org-base openoffice.org-calc openoffice.org-core openoffice.org-draw openoffice.org-graphicfilter openoffice.org-impress openoffice.org-math openoffice.org-writer openoffice.org-xsltfilter openoffice.org-headless mysql-server mysql xml-commons-apis wget ImageMagick



mkdir /opt/alfresco
cd /opt/alfresco

wget \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-tomcat-3.2r2.tar.gz \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-war-3.2r2.tar.gz \
http://dl.alfresco.com/release/community/build-2440/AlfrescoRMCommunity-3.2r2-Linux-x86-Install \
http://dl.alfresco.com/release/community/build-2440/alfresco-dod5015-unsupported.amp \
http://dl.alfresco.com/release/community/build-2440/alfresco-dod5015-share-unsupported.amp \
http://dl.alfresco.com/release/community/build-2440/vti-module.amp \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-deployment-3.2r2.zip \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-sample-extensions-3.2r2.tar.gz \
http://dl.alfresco.com/release/community/build-2440/phpIntegration-unsupported.amp \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-excel2003-addin-3.2r2.zip \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-office2003-addins-3.2r2.zip \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-powerpoint2003-addin-3.2r2.zip \
http://dl.alfresco.com/release/community/build-2440/alfresco-community-word2003-addin-3.2r2.zip

wget http://voxel.dl.sourceforge.net/project/alfresco/Alfresco/3.2r%20Community%20Edition/alfresco-community-war-3.2r.tar.gz \ 
  http://voxel.dl.sourceforge.net/project/alfresco/Alfresco/3.2r%20Community%20Edition/alfresco-community-sample-extensions-3.2r.tar.gz \
  http://voxel.dl.sourceforge.net/project/alfresco/Alfresco/3.2r%20Community%20Edition/alfresco-xforms-examples-3.2r.tar.gz \
  http://voxel.dl.sourceforge.net/project/alfresco/WCM/3.2r%20Community%20Edition/alfresco-community-wcm-3.2r.tar.gz \
  http://voxel.dl.sourceforge.net/project/alfresco/Records%20Management/3.2r%20Community%20Edition/AlfrescoRMCommunity-3.2r-Linux-x86-Install \
  http://voxel.dl.sourceforge.net/project/alfresco/Records%20Management/3.2r%20Community%20Edition/alfresco-dod5015-unsupported-3.2r.amp \
  http://voxel.dl.sourceforge.net/project/alfresco/Records%20Management/3.2r%20Community%20Edition/alfresco-dod5015-share-unsupported-3.2r.amp \
  http://voxel.dl.sourceforge.net/project/alfresco/Extensions/3.2r%20Community%20Edition/vti-module-3.2r.amp \
  http://mysql.he.net/Downloads/Connector-J/mysql-connector-java-5.1.12.tar.gz \
  http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/SRPMS/java-1.6.0-sun-compat-1.6.0.06-1jpp.src.rpm \
 


 




 


Sun Java JDK - Download and Install


No direct link allowed, so you must click through a few screens to download:

http://java.sun.com/javase/downloads/index.jsp

Once you download, install it:

chmod +x jdk-6u20-linux-i586-rpm.bin
./jdk-6u20-linux-i586-rpm.bin


Answer the few questions, done.


Sun Java JDK - Setup


Add the JDK to the alternatives so it can be setup as the default:

alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_20/bin/java 100
alternatives --install /usr/bin/jar jar /usr/java/jdk1.6.0_20/bin/jar 100
alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_20/bin/javac 100

Set Sun Java JDK as the default java (there can be only one!):

/usr/sbin/alternatives --config java
/usr/sbin/alternatives --config jar
/usr/sbin/alternatives --config javac

For each of the alternatives it'll ask you to pick a number for the default, choose the /usr/java/jdk... just like it was just installed.

Note: for the alternatives command, you have to paste one at a time or separate with a semicolon.





[root@server alfresco]# mkdir -p /usr/src/redhat/SOURCES

[root@server alfresco]# rpm -ivh java-1.6.0-sun-compat-1.6.0.06-1jpp.src.rpm
warning: java-1.6.0-sun-compat-1.6.0.06-1jpp.src.rpm: Header V3 DSA signature: NOKEY, key ID c431416d
    1:java-1.6.0-sun-compat  warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]

[root@server alfresco]# cd /usr/src/redhat/SPECS/
[root@server SPECS]# vi java-1.6.0-sun-compat.spec

%define buildver        20
...
%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/cacerts
%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/blacklist
%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/javaws.policy
%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/trusted.libraries

[root@server SPECS]# rpmbuild -bb java-1.6.0-sun-compat.spec
[root@server SPECS]# rpm -Uvh /usr/src/redhat/RPMS/x86_64/java-1.6.0-sun-compat-1.6.0.20-1jpp.x86_64.rpm
[root@server SPECS]# java -version
java version '1.6.0_20'
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

[root@server SPECS]# alternatives --config java

There are 2 programs which provide 'java'.

   Selection    Command
-----------------------------------------------
    1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2           /usr/lib/jvm/jre-1.6.0-sun/bin/java

Enter to keep the current selection[+], or type selection number:<enter>

[root@server SPECS]# cd ~/alfresco
[root@server alfresco]# vi /etc/sysconfig/tomcat5
# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
# Just do not forget to export them 🙂

JAVA_OPTS='$JAVA_OPTS -Xms1g -Xmx512m -XX:MaxPermSize=512M'

[root@server alfresco]# mkdir base
[root@server alfresco]# cd base
[root@server base]# tar xzf ../alfresco-community-war-3.2r.tar.gz
[root@server base]# chkconfig mysqld on
[root@server base]# service mysqld start
[root@server base]# mysql -u root -p