Board index Linux Installation Stuffs

Moderator: chandranjoy

Openmeetings and RED5 installation steps

Postby chandranjoy » Fri Apr 09, 2010 5:11 am

Openmeeting installation:


Pre-requirements installation:


I.Open Office Service:

Install Open Office Service on Linux (versions > 2.3):
==========================================

1. Install OpenOffice-Headless as root (through su, sudo, etc.):

yum install openoffice.org-headless


2. Create and edit a file named openoffice.sh (for example) with you favorite editor over /etc/init.d:

vi /etc/init.d/openoffice.sh

#!/bin/bash
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
#
OOo_HOME=/usr/bin
SOFFICE_PATH=/usr/lib/openoffice.org/program/soffice
PIDFILE=/var/run/openoffice-server.pid

set -e

case "$1" in
start)
if [ -f $PIDFILE ]; then
echo "OpenOffice headless server has already started."
sleep 5
exit
fi
echo "Starting OpenOffice headless server"
$SOFFICE_PATH -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
touch $PIDFILE
;;
stop)
if [ -f $PIDFILE ]; then
echo "Stopping OpenOffice headless server."
killall -9 soffice && killall -9 soffice.bin
rm -f $PIDFILE
exit
fi
echo "Openoffice headless server is not running."
exit
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0


3. Change the permissions to this file:

chmod 0755 /etc/init.d/openoffice.sh


4. Install openoffice.sh init script links:

update-rc.d openoffice.sh defaults
(Please ignore this step if you are not using Debian or Ubuntu)

5. Start the service:

/etc/init.d/./openoffice.sh start


6. You can see if Openoffice is running with this command:

netstat -nap | grep office


You should get something like this:

tcp 0 0 127.0.0.1:8100 0.0.0.0:*
LISTEN 2467/soffice.bin


* Service openoffice start automatically when you restart the next time your server.


II.ImageMagick:

For installing imagemagick on a cpanel server,
you need to undergo below steps :

1. Log into your server as root
2. cd /usr/local/src/
3. wget http://layer1.cpanel.net/magick.tar.gz
4. tar zxvf magick.tar.gz
5. cd magick
6. /scripts/installrpm ImageMagick
7. /scripts/installrpm ImageMagick-devel
8. sh ./install



Check the ImageMagick Installation:

/scripts/checkimagemagick
you can check your ImageMagick version:
/usr/bin/convert --version
It will give you something like:
Version: ImageMagick 6.4.8 2009-05-11 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC



III.Ghostscript


How to install Ghostscript?

The basic:
Download source at http://ghostscript.com/releases/ghostscript-8.70.tar.gz

./configure
make
make install


Done

Example: Install Ghostscript 8.63

cd /usr/local/src/
wget http://mirror.cs.wisc.edu/pub/mirrors/g ... .63.tar.gz
tar zxf ghostscript-8.63.tar.gz
cd ghostscript-8.63
./configure
make
make install



IV.Swftools:


cd /usr/local/src
wget http://www.swftools.org/swftools-2010-02-06-1900.tar.gz
tar -xvzf swftools-2010-02-06-1900.tar.gz
cd swftools-2010-02-06-1900
./configure
make
make install


Red5 Flash media server:


What is red5 server ?

Red5 is an Open Source Flash Server written in Java that supports:

* Streaming Audio/Video (FLV and MP3)
* Recording Client Streams (FLV only)
* Shared Objects
* Live Stream Publishing
* Remoting (AMF)

This is an amazing application for developing flash. even though its installation is not in a straight way. So this document will help you to setup a red5 server with a cool startup script to start and stop installations.

IMP: This procedure istested in RHEL , Fedora , Centos5 cpanel servers with red5 version 0.7.0. So I hope it will work in most distributions. But the startup script will not work in debian flavors. I don’t have so much time to buy a server and install debian for testing. May be in near future I can do that.

Packages required for installation.
1) Jdk 1.5 , J2ee.jar
2) Apache-ant
3) svn client ( for downloading the svn packages of red5 )
4) Lates red5 svn trunc distribution ( Please don’t use the tar distribution of red5, because some jar mirror are missing during make )



1) Installing Jdk and J2ee.jar

Please download and install the jdk and j2ee.jar from a java mirror. Or just copy paste the following links.
# cd /usr/local/src
# wget http://downloads.sherin.co.in/java/jdk- ... x-i586.bin
# chmod 755 jdk-1_5_0-linux-i586.bin
#./jdk-1_5_0-linux-i586.bin
# mv jdk1.5.0/ /usr/local/
# ln -s /usr/local/jdk1.5.0/ /usr/local/jdk
#wget http://downloads.sherin.co.in/java/j2ee.jar
# mv j2ee.jar /usr/local/jdk/lib/


Now the installation of java components finished.

2) Installing Apache Ant

Please go to http://ant.apache.org/bindownload.cgi and download latest apache-ant distribution, or copy paste the following lines.
# cd /usr/local/src/
# wget http://downloads.sherin.co.in/red5/apac ... bin.tar.gz
# tar -xzf apache-ant-1.7.1-bin.tar.gz
# mv apache-ant-1.7.1 /opt/
# ln -s /opt/apache-ant-1.7.1 /opt/ant



3) Set the PATHS

This is very important. If you are skipping this step then you are breaking the installation. So very important to set the paths .
Do the following commands,
# export JAVA_HOME=/usr/local/jdk
# export PATH=$JAVA_HOME/bin:$PATH
# export CLASSPATH=.:$JAVA_HOME/lib/classes.zip
# export PATH=”$PATH:/usr/local/bin:/usr/X11R6/bin:/opt/ant/bin”
# export ANT_HOME=/opt/ant


Now open the file /etc/bashrc and insert the above lines ( without # ) at the bottom of the script, because for the future working you need these environment variables. Otherwise you may need to set the above variables again and again during every login time. So It is very important to set the above lines in /etc/bashrc , got it !

4) Installing SVN

In general all distributions have its own subversion packages. In Centos/RHEL/Fedora you can use “yum” to install svn client.
# yum install subversion

Or download the source of svn and install it.


5) Installing red5

Now proceed with following steps to install red5 FMS. Please use only SVN TRUNC distributions.

# cd /opt/
# svn co http://svn1.cvsdude.com/osflash/red5/java/server/trunk red5
# cd red5/
# make

Now we have build the red5 server. So the next step is configuring start up scripts. This script is very use full to start/stop red5 server. unfortunately red5 distributions not providing it. So I wrote this small script. This script is using the normal start/stop scripts from the folder /opt/red5/dist/.


6) Creating init start-up script /etc/init.d/red5


Now create a file with name/etc/init.d/red5 .

Please copy paste the following code to /etc/init.d/red5.
#==========Start init script ==========

#!/bin/sh
# red5
# chkconfig: 2345 95 55
# description: red5 server startup script

# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
else
echo "Could not find functions file, your system may be broken"
exit 1
fi

# Source networking configuration.
if [ -f "/etc/sysconfig/network" ] ; then
. /etc/sysconfig/network
fi

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting red5: "
cd /opt/red5/dist/; sh red5.sh 2 >/dev/null &
echo_success
echo
touch /var/lock/subsys/red5
;;
stop)
# Stop daemons.
echo -n "Shutting down red5: "
cd /opt/red5/dist/; sh red5-shutdown.sh 2 >/dev/null
echo_success
echo
rm -f /var/lock/subsys/red5
;;
*)
echo "Usage: red5 {start|stop}"
exit 1
esac

exit 0

#=============End of init==============


PS : You can download it from http://script.sherin.in/red5.sh . if so move red5.sh to/etc/init.d/red5 .

Now we have created the init sript. chmod this script for getting execute permission .
# chmod 755 /etc/init.d/red5


Nowstart/stop the red5 server as follows

# /etc/init.d/red5 start
# /etc/init.d/red5 stop


7) Testing the installation

First you need to start your red5 installation using he following command,
# /etc/init.d/red5 start
Now open your web browser and type the following url
http://<server ip adress : 5080/


where ,“server ip address” is the IP of your server.

TIP:
if you need to automatically start the service during system start up, please add ”/etc/init.d/red5 start” line to /etc/rc.local

Install and configure Openmeetings:
1) Go to the Google Code page for OpenMeetings

2) Download the following and put them in a work folder:
- openmeetings051.zip
- openmeetings_moodle_plugin_v02.zip
- openmeetingsaudience_moodle_plugin_v02.zip


3) Go to the installation page and read the requirements.

Note: the above installation was performed on top of Unbuntu 8.04, running MySQL 5.0.51a. Contrary to the install docs, MySQL on Ubuntu does listen on TCP/IP port. It's only listening on IP address 127.0.0.1 though. You may need to change this if your OpenMeetings server is going to be on a different box than your MySQL server.

4) Stop your MySQL server and add the following lines to /etc/mysql/my.conf

[mysqld]
default-character-set=utf8
character-set-server=utf8

[client]
default-character-set=utf8

Note: I added them right before the lines that look like (near the end):

#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#


5) Restart your MySQL service

6) Fire off your Synaptic Package Manager and make sure the following packages are installed.

- GhostScript
- ImageMagick
- libpaper-utils
- msttcorefonts
- openoffice.org-base
- openoffice.org-calc
- openoffice.org-draw
- openoffice.org-filter-binfilter
- openoffice.org-filter-mobiledev
- openoffice.org-headless,
- openoffice.org-impress
- openoffice.org-math
- openoffice.org-writer
- pstoedit
- SWFTools
- ttf-dejavu
- netbeans

Note: you may have to run "System - Administration - Software Sources" and enable the extra repositories (do not add the repository as suggested in the OpenOfficeConverter docs, it'll break your stuff!).

Note: If you care to, the test script on the OpenOfficeConverter Install page should work now. However, only for the first step (you don't have the RED5 server installed yet).

Update: If you haven't already done it, be sure to install netbeans. (I missed this during the previous version of this howto.) Red5 will not run without it.

7) Download and install Adobe's Flash Player 10 beta

8) Go to the RED5 Open Source Flash Server web page and download version 0.7.0 of the software (Hint: if you right click on "Red5_0.7.0_all.deb", choose the "GDebi Package Installer" instead of saving it as a file. This will cause the installer to also grab the Java packages.)

Note: If you properly installed Adobe Flash Player 10 beta (in step 7), the bee at the top of the RED5 page should be moving.

9) Move the openmeetings051.zip file (that you downloaded earlier) into /usr/lib/red5/webapps/ and unzip it.

10)
cd into /usr/lib/red5/webapps/openmeetings/conf


11)
mv any_hibernate.xml old.any_hibernate.xml.old


12)
cp mysql_hibernate.cfg.xml hibernate.cfg.xml


13) Log into MySQL and create a database called "openmeetings". Grant permissions on it via:

grant all on openmeetings.* to SamFrank@localhost identified by "disco";


Be sure to change "SamFrank" to whatever you want the username to be, and "disco" to whatever you want the password to be. (Apologies for the reference to the ancient Sinatra joke.)

14) Open hibernate.xml in your favorite text editor and look for the following three lines. Change them to appropriate values (what you used in step 13).

Code: Select all
<property name="connection.username">SamFrank</property>
<property name="connection.password">disco</property>
<property name="connection.url">jdbc:mysql://YOUR_HOSTNAME/YOUR_DATABASE</property>


Most will leave the username as "root". The connection URL may already be different that the below. If it is, leave it alone (for now). Here's what my "connection.url" line looks like:

Code: Select all
<property name="connection.url">jdbc:mysql://localhost/openmeetings?useUnicode=true
&createDatabaseIfNotExist=true&characterEncoding=utf-8</property>


Note: The above should all be on one line. You'll run into trouble if you cut and paste it without editing.

15) Edit /usr/lib/red5/webapps/openmeetings/WEB-INF/web.xml. Look for the following:

Code: Select all
<!-- This will only work for Red5-0.6.3 !!
                in 0.7 this throws an Error and the App will not start -->
        <context-param>
            <param-name>log4jConfigLocation</param-name>
            <param-value>/WEB-INF/log4j.properties</param-value>
        </context-param>


and make it look like:

Code: Select all
<!-- This will only work for Red5-0.6.3 !!
                in 0.7 this throws an Error and the App will not start
        <context-param>
            <param-name>log4jConfigLocation</param-name>
            <param-value>/WEB-INF/log4j.properties</param-value>
        </context-param>
        -->


Basically, you're commenting out this section. Notice that the "close comment" code moves from the second line to after the close tag for the section. For anything other than Red5 v0.6.3, this funciton throws an error and keeps the RED5 server from starting.

16) Stop and start the RED5 server
service red5 stop
service red5 start


Note: I forgot to mention that I also installed the SYSV service management package. This is just a convenience for me. You don't need this, just use whatever method with which you're comfortable.

17) point your browser at http://localhost:5080/openmeetings/install and follow the prompts.

So this is all about red5 server and Openmeetings installations. Enjoy :)
chandranjoy
Site Admin
 
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to Installation Stuffs

Who is online

Users browsing this forum: No registered users and 1 guest


cron