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)

Actaully i really look down on JAVA products because it’s used huge memories.But this time , we wanna launch a flash chat and video site, gogole , and google, at last, we decided to use red5.

now let’s go.

step 1: install java.

Download the latest version of JDK from http://java.sun.com/javase/downloads/index.jsp (Download the rpm.bin file)
At the time of this tutorial it was JDK 1.6 update 4

Make the downloaded bin file executable

Quote:
chmod +x jdk-6u1-linux-i586-rpm.bin

Run the installer and accept the license agreement. It will extract the file jdk-6u1-linux-i586.rpm

Quote:
./jdk-6u1-linux-i586-rpm.bin

Install the rpm jdk-6u1-linux-i586.rpm

Quote:
rpm -Uvh jdk-6u1-linux-i586.rpm

If evrything went fine, java -version will output the java version number.

source /etc/profile

java -version

step 2:Apache ant

Download the latest version of apache ant from http://apache.mirror.facebook.com/ant/binaries

Extract the zip file

Quote:
tar -xzvf apache-ant-1.7.0-bin.tar.gz

All the contents will be extracted to the folder apache-ant-1.7.0
Rename and Move the folder to the installation folder (/usr/local/ant would just be fine.)

Quote:
mv apache-ant-1.7.0 /usr/local/ant

Add the following lines to the end of /etc/profile

Quote:
PATH=$PATH:/usr/local/ant/bin
ANT_HOME=/usr/local/ant

source /etc/profile

3. Subversion (option)

Subversion installation is necessary only if you are want to install the latest development version of Red5 from the trunk. If you are installing a stable version of Red5, then you can skip this step.

Install the latest version of subversion using yum,

Quote:
yum -y install subversion

(’-y doesn’t ask for confirmation’)

If yum reports ‘nothing to do’ then,

a. Open /etc/yum.conf and check whether there is a line starting with ‘exclude=’
If yes, then comment out the kine by adding a # before the line.
If not, then follow the the following step

b. Add the rpmforge repo by downloading and installing,

Quote:
wget http://dag.wieers.com/packages/rpmfo…l4.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el4.rf.i386.rpm

Now run ,

Quote:
yum -y install subversion

Do remember to uncomment the ‘exclude=’ line in /etc/yum.conf if you commented it as it could prove as an important security measure.

RED 5 Installation

This command will checkout the red5 trunk into the red5-trunk directory.
Now you are ready to build the server.

Quote:
cd red5-trunk
ant ivyclear dist

This will clear the ivy configs and build the server. Once that is finished We should first try and run the server from the red5-trunk/dist directory to make sure it is working.

Quote:
cd dist
chmod 755 red5.sh
screen
sh red5.sh

At this point the server should start. You can hit Ctr+ C to stop it. If you get this far without errors you should be good to go. However, it is good to keep red5 in /usr/local/red5 so do the following.

Quote:
mkdir /usr/local/red5
cp -R dist/* /usr/local/red5

Now you can navigate to /usr/local/red5 and start the server in the same way as above. If there are no errors you should now have the latest version of red5 installed and working fine.

Quote:
screen
sh red5.sh

Note : Use screen to start red5 because when you close out your ssh session red5 will shut down unless it is running as a
daemon process.

To install a stable release of Red 5 , the process is very similar. See below for the steps for installing a stable Red5 version. The latest release version is 0.6.3

Quote:
wget http://dl.fancycode.com/red5/0.6.3/s…5-0.6.3.tar.gz
tar -xzvf red5-0.6.3.tar.gz
mv red5-0.6.3 /usr/local/red5
cd /usr/local/red5
chmod 755 red5.sh red5-shutdown.sh red5_debug.sh
screen
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 195 ms
[INFO] [main] /SOSample - Initializing Spring root WebApplicationContext
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
[INFO] [main] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [main] org.springframework.beans.factory.support.DefaultListablebeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListablebeanFactory@a166bd: defining beans [placeholderConfig,web.context,web.scope,web.handler]; parent: org.springframework.beans.factory.support.DefaultListablebeanFactory@104e28b
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 50 ms
[INFO] [main] /test - Initializing Spring root WebApplicationContext
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
[INFO] [main] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [main] org.springframework.beans.factory.support.DefaultListablebeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListablebeanFactory@1422384: defining beans [placeholderConfig,web.context,web.scope,web.handler,test.service,echo.service]; parent: org.springframework.beans.factory.support.DefaultListablebeanFactory@104e28b
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 60 ms
[INFO] [main] /midiDemo - Initializing Spring root WebApplicationContext
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
[INFO] [main] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [main] org.springframework.beans.factory.support.DefaultListablebeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListablebeanFactory@174f02c: defining beans [placeholderConfig,web.context,web.scope,web.handler]; parent: org.springframework.beans.factory.support.DefaultListablebeanFactory@104e28b
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 299 ms
[INFO] [main] /messageRecorder - Initializing Spring root WebApplicationContext
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
[INFO] [main] org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from ServletContext resource [/WEB-INF/red5-web.properties]
[INFO] [main] org.springframework.beans.factory.support.DefaultListablebeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListablebeanFactory@537935: defining beans [placeholderConfig,web.context,web.scope,web.handler]; parent: org.springframework.beans.factory.support.DefaultListablebeanFactory@104e28b
[INFO] [main] org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 37 ms
[INFO] [main] org.mortbay.log - Started SelectChannelConnector@0.0.0.0:5080
[INFO] [main] org.red5.server.Standalone - Startup done in: 9061 ms