How To Install RED5 version 0.8 or 0.9 on CENTOS 5.4

RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing etc. In this short steps you can install red5 server on your virtual server or dedicated.

Download and Install Java

RED5 server depends on Java, so lets install it first using yum:

# yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

Download and Install Ant (Apache Project)

Ant will need to compile RED5 server code. Ant comes in binary form, so just download and install it in /usr/local directory. This step may cause problems because they all always updating the apache ant and changing the name of it, so sometimes the binary is called apache-ant-1.8.0RC1-bin.tar.gz sometimes apache-ant-1.8.0-bin.tar.gz so you will have to get the correct link, go to http://opensource.become.com/apache/ant/binaries/ and find what they have, get the one which ends on tar.gz, should be about 9-10 mega file, so edit the link down to the correct one;

# cd /usr/src
# wget http://opensource.become.com/apache/ant/binaries/apache-ant-xxxxx-bin.tar.gz    (replace apache-ant-xxxxx-bin.tar.gz with the correct file)
# tar zxvf apache-ant-xxxxx-bin.tar.gz   (replace apache-ant-xxxxx-bin.tar.gz witht he correct file)
# mv apache-ant-xxxxx/ /usr/local/ant     (pay attention, replace xxxxx with the correct version)

Export Variables for Ant and Java

# export ANT_HOME=/usr/local/ant
# export JAVA_HOME=/usr/lib/jvm/java
# export PATH=$PATH:/usr/local/ant/bin
# export CLASSPATH=.:$JAVA_HOME/lib/classes.zip

Also export these variables in /etc/bashrc to become available for every user login or for any terminal opens.

# echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrc
# echo ‘export JAVA_HOME=/usr/lib/jvm/java’ >> /etc/bashrc
# echo ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrc
# echo ‘export CLASSPATH=.:$JAVA_HOME/lib/classes.zip’ >> /etc/bashrc

Download and Install RED5 Server

Now we come to the main part, which one you want? 0.8, 0.9, 0.7??

you can find the various versions available at:

http://red5.googlecode.com/svn/java/server/tags/

if for example you want version 0.8, then the command would be:

svn co http://red5.googlecode.com/svn/java/server/tags/0_8_0/ red5

if you want the 0.9, then:

svn co http://red5.googlecode.com/svn/java/server/tags/0_9rc1/ red5

so lets say we take 0.8 version:

# cd /usr/src
# svn co http://red5.googlecode.com/svn/java/server/tags/0_8_0/ red5
# mv red5 /usr/local/
# cd /usr/local/red5
# ant prepare
# ant dist

you will see lots and lots of lines, but you should get at last

BUILD SUCCESSFUL

that’s mean its install and now copy the conf directory from dist/ and test the red5 installation.

# cp -r dist/conf .
# ./red5.sh

If it shows Installer service created in the last then everything is fine here, press ctrl+c

Now go to the red5 folder:

# cd /usr/local/red5/dist

command to stop red5:

# sh red5-shutdown.sh
sometimes it is better to use:
# killall -9 java

Command to start red5:

# cd /usr/local/red5/dist

# sh red5.sh &

When Red5 is running you should be able to access http://your-server-domain-or-ip:5080/ .

If it works first thing go to http://your-server:5080/installer/and install admin. Then to http://your-server:5080/admin/register.html and register an username and password. Then you can check application statistics anytime from http://your-server:5080/admin/ with server ip and the registered username, password.

RED 5 RESTART

You need to restart every time you add or update files in the /usr/local/red5/dist/webapps folder – where all applications should be installed.

Tags:

Comments are closed.