Alfresco Community 3.2 and CentOS 5.3 x86 Installation

Home » Computer Articles » Linux » Alfresco Community 3.2 and CentOS 5.3 x86 Installation
September 21, 2009 Linux No Comments

Install CentOS 5.3 in text mode without any server application options.

Update and harden CentOS 5.3

Applications you need to install after server installation.

yum install xauth

Download Sun Java JDK and Install (Choose Java SE Development Kit (JDK))

Download Sun JDK (Version I used jdk-6u16-linux-i586-rpm.bin)

Copy Java JDK to Server and Install

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

More Applications you need to install.

yum install ImageMagick
yum install libXaw
Download and install t1lib click here to download t1lib, rpm -ivh t1lib-.1.0-1.el5.rf.i386.rpm
yum install giflib
Download and install libmp3lame click here to download libmp3lame.so.0, rpm -ivh libmp3lame0-3.98.2-20.el5.i386.rpm
Download and install SWFTools click here to download SWFTools, rpm -ivh swftools-0.8.1-1.el5.rf.i386.rpm
yum install 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
rpm -e --nodeps java-1.4.2-gcj-compat (You don't need this one because you have installed Sun Java JDK)
yum install mysql-server

Startup MySQL Server and set password

/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password 'newpassword'
chkconfig mysqld on (So when the server reboots MySQL will startup with Server)

Download Alfresco and copy to server

Download Alfresco Community Free Addition (Version I used Alfresco-Community-3.2-Linux-x86-install)

Once downloaded copy to server and make executable.

chmod +x Alfresco-Community-3.2-Linux-x86-Install

Run below to Install

./Alfresco-Community-3.2-Linux-x86-Install

When installing Alfresco it wouldn't install database, Uncheck database option and do below:

mysql -u root -p < /opt/Alfresco/extras/databases/mysql/db_setup.sql

If you mess up the MySQL database you can use theses commands to clean out MySQL

mysql -u root -p
mysql>drop database alfresco;
mysql>select * from mysql.user;
mysql>drop user 'alfresco'@'localhost';
mysql>drop user 'alfresco'@'localhost.localdomain';
mysql>FLUSH PRIVILEGES;
Then run this command again "mysql -u root -p < /opt/Alfresco/extras/databases/mysql/db_setup.sql"

Edit this file to add proper paths to installed applications.

vi /opt/Alfresco/tomcat/shared/classes/alfresco-global.properties

ooo.exe=/usr/lib/openoffice.org/program/soffice
img.root=/usr
swf.exe=/usr/bin/pdf2swf

To Start or Stop Alfresco

cd /opt/Alfresco/
./alfresco.sh start
./virtual_alf.sh start
"This will take time because the first time it has to create all the tables etc."

To Access Alfresco after that

http://ip-address:8080/alfresco (Seems to take time to load the first time)
When the My Alfresco Dashboard shows up you are in the money.

Now the work really starts.

Init script for OpenOffice
vi /etc/init.d/openoffice (Add the information below starting with #!/bin/bash)
chmod +x /etc/init.d/openoffice
chkconfig openoffice on

#!/bin/bash
#
# Boot open office so that Alfresco can do transforms.
# chkconfig: 2345 55 25
# description: OpenOffice Headless
#
# processname: soffice

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0

VDISPLAY='99'
SOFFICE_PATH='/usr/lib/openoffice.org/program'
SOFFICE_ARGS1="-nologo -headless -display :$VDISPLAY "
SOFFICE_ARGS2='-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager'
SOFFICE_PIDFILE=/var/run/soffice.bin.pid

XVFB=/usr/bin/Xvfb
XVFB_ARGS=":$VDISPLAY -screen 0 800x600x8 -fbdir /var/run"
XVFB_PIDFILE=/var/run/xvfb.pid
start_soffice() {
echo -n $"Starting OpenOffice"
$SOFFICE_PATH/soffice $SOFFICE_ARGS1 $SOFFICE_ARGS2 >/dev/null 2>&1 &
[ $? -eq 0 ] && echo_success || echo_failure
pidof soffice.bin > $SOFFICE_PIDFILE
echo
}
start_xvfb() {
echo -n $"Starting Xvfb"
$XVFB $XVFB_ARGS >/dev/null 2>&1 &
[ $? -eq 0 ] && success || failure
pidofproc Xvfb > $XVFB_PIDFILE
echo
}
start() {
start_xvfb
sleep 3
start_soffice
}
stop() {
echo -n $"Stopping OpenOffice"
killproc soffice.bin
echo
echo -n $"Stopping Xvfb"
killproc Xvfb
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
esac

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *