Red5 server installation on Redhat CentOs Linux

If you reach this page then you probably cannot afford Adobe FMS but Red5 open source flash server is here to save your day. I have been working with red5 since version 0.6.2 and in this post we will go through the installation of 1.0 SVN.
Red5 support streaming video/audio content( flv, aac and mp3), recording streams in flv and live publishing. I am doing Red5 installation on CentOs 5 machine here and instructions would be same for Redhat Enterprise

1) Installation of Java
Login to server as root and goto
cd /usr/local/src

Download jdk 7 linux rpm package from sun
http://java.sun.com/javase/downloads/index.jsp
Select 32 Bit or 64 Bit package as per your OS.

We will be taking example of 64 Bit here
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-x64.rpm -O jdk-7u1-linux-x64.rpm
chmod 777 jdk-6u7-linux-i586-rpm.bin
rpm -ivh jdk-7u1-linux-x64.rpm

URL in wget link can be different and if it does not work get the correct URL from

http://www.oracle.com/technetwork/java/javase/downloads/index.html

once completed setup the java home path

export JAVA_HOME=/usr/java/latest

2) Installation of apache ant

cd /usr/local
download latest apache ant tar.gz from http://ant.apache.org/bindownload.cgi
or
wget http://apache.mirrors.redwire.net/ant/binaries/apache-ant-1.7.1-bin.tar.gz
tar zxf apache-ant-1.7.1-bin.tar.gz
mv apache-ant-1.7.1 ant
rm -Rf apache-ant-1.7.1-bin.tar.gz

Export apache ant home
export ANT_HOME=/usr/local/ant

create symbolic link
ln -s /usr/local/ant/bin/ant /usr/bin/ant

3) Red5 installation
You can download latest build Red5 from google code
http://code.google.com/p/red5/

Get it from Source SVN as their download packages will not work 90% of the time giving all sort of errors. If you don’t have subversion install it with
yum install subversion

Login to your server via SSH as root and run:
mkdir red5
svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5
cd red5/
make
cp -r dist/conf .
sh red5.sh

just a point don’t miss dot(.) end of cp -r dist/conf command above, It specifies copying folder from /dist to current directory. Sometimes people miss this while copy pasting command.

If everything is ok then you will see something like this:
[INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created

Press ctrl+c to exit and run red5 server as a daemon:
./red5.sh >/dev/null 2>&1 &
or
nohup sh red5.sh &

Red5 http service run on port 5080 and rtmp on port 1935.

First thing you can do is visit http://your_server_ip:5080 and install red5 demo apps, example apps like oflademo can be used to stream media straight out of the box.

Feel free to update here if you are struck at installation or red5 is not starting and i will be glad to assist.

Post to Twitter

Share

About the Author