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.
Thank you so much. It’s helpful.
Great Great Great ever greatest Red5 tutorial. I’ve spent 8 hours to find a proper tutorial and started to give up. But this step by step explanation is most clear and perfect. Simple language, proper explanations, without any snobism… Thank you.
thanks for the good tutorial on Linux, I found this RED5 on windows tutorial would like to share will all :
http://askmeflash.com/tutorial/7/red5-installation-and-setup-how-to
Thanks Rahul,
I’ve done everything as you mentioned. But when i try to start the server by
$./red5.sh
I get an error that says these two classes are missing
—————————————–
org.red5.logging.LoggingContextSelector
org.slf4j.bridge.SLF4JBridgeHandler
—————————————
I tried to find then in the lib/ directory(inside the jar files) but these classes
aren’t inside the jar’s that are located inside lib/.
Thanks in advance.
Regards,
Reynold.P.J
I am getting below error when running command sh ./red5.sh
Unable to locate Java. Please set JAVA_HOME environment variable
Not sure how to find JAVA_HOME value
I am using Ubuntu 10.1 version
Please help me
Thanks
Very very helpfull tutorial… we have many on the net but none with this explanation .. i have bookmarked it for future reference.
i have sucesfully installed the red5 but when i type the URL in the browser i m not getting red welcome pages why…
plz help me plz plz thanks in advance