INSTALL RED5 IN A CENTOS CPANEL/WHM SERVER !

RED5 is a streaming application which can be used to stream live broadcasting.

I done it today for a client from srilankan to for a live streaming. The steps are given below which helps anyone to install it.

First Of all install java

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

Then Install ANT



cd /root/tmp
wget http://mirrors.kahuki.com/apache/ant/bin...in.tar.bz2
tar jxvf apache-ant-1.8.0-bin.tar.bz2
mv apache-ant-1.8.0 /usr/local/ant

Export the Variable For ANT as given below:

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

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

If SVN is not installed then Install it:

yum install perl-URI

yum install subversion

Then Install RED5

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
cp -r dist/conf .

Start RED5:

./red5.sh &

EDIT init script:
vi /etc/init.d/red5

download https://.sohailriaz.com/downloads/red5.txt and copy / paste code in it. The init script code also be viewed below.

#!/bin/sh
# For RedHat and cousins:
# chkconfig: 2345 85 85
# description: Red5 flash streaming server
# processname: red5

PROG=red5
RED5_HOME=/usr/local/red5
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid

# Source function library
. /etc/rc.d/init.d/functions

[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5

RETVAL=0

case “$1″ in
start)
echo -n $”Starting $PROG: ”
cd $RED5_HOME
$DAEMON >/dev/null 2>/dev/null &
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo $! > $PIDFILE
touch /var/lock/subsys/$PROG

fi
[ $RETVAL -eq 0 ] && success $”$PROG startup” || failure $”$PROG startup”
echo
;;
stop)
echo -n $”Shutting down $PROG: ”
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
;;
restart)
$0 stop
$0 start
;;
status)
status $PROG -p $PIDFILE
RETVAL=$?
;;
*)
echo $”Usage: $0 {start|stop|restart|status}”
RETVAL=1
esac

exit $RETVAL

Now Start The Service:

/etc/init.d/red5 start

check status

/etc/init.d/red5 status
red5 (pid  XXXXX) is running…

6) Test

Now test the RED5 installation by opening following URL in browser

http://yourip:5080/

you will see red5 page like this:

and demos can be find here.

http://yourip:5080/demos/
The link http://gregoire.org/2008/10/01/red5-admin/ helps me to fix a major issue that I faced after the installation.
RED5 ADMIN
http://YOUR_SERVER_IP:5080/installer/ (install admin)
http://YOUR_SERVER_IP:5080/admin/register.html (add user/pass)

http://YOUR_SERVER_IP:5080/admin/

TROUBLESHOOTING

http://YOUR_SERVER_IP:5080/demos/port_tester.html

* when testing ports, use server IP not localhost
Make these ports accept connections: 1935, 1936, 5080, 8088

tomcat-dbcp.jar – only needed if the next error occurs:
javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]
*if the above error occurs, place the tomcat-dbcp.jar in [red5 root]/lib and restart red5

mysql-connector-java-5.1.12-bin.jar missing
if you are unable to connect to backend services, it means that the MySQL driver is missing, download it and place it in your /lib folder

commons-dbcp-1.4.jar missing
if you are unable to start your Red5 application (or it doesn’t even show up in admin), download commons-dbcp-1.4.jar and place it in your /lib folder

Red5 Admin not found Red5 0.9
After installing Red5 0.9 and trying to access SERVER_IP:5080/admin/ you will (may) encounter the following error:

HTTP Status 404 – /admin
type Status report
message /admin
description The requested resource (/admin) is not available.
Apache Tomcat/6.0.26

no problem, the admin panel was moved here: SERVER_IP:5080/demos/adminPanel.html

When logging in, use the server IP for “Server Address” and the user “admin” with the password “admin”.

If that does not work, you must register an admin user, just follow the instructions below:[/b]
*assuming that your Red5 installation path is /usr/local/red5 if it is different (ex. /opt/red5 or /opt/red5/dist/) just change those values in the following commands

Get the plugins:

cd /root/tmp
mkdir /usr/local/red5/plugins
wget http://red5.googlecode.com/files/AdminPlugin-1.0.zip
unzip -d /usr/local/red5/plugins AdminPlugin-1.0.zip

Get the Red5 admin register page:

mkdir /usr/local/red5/webapps/admin
wget http://red5.googlecode.com/files/admin.jsp
mv admin.jsp /usr/local/red5/webapps/admin

*restart Red5 (/etc/init.d/red5 restart)

Access Register Admin page: YOUR_IP:5080/admin/admin.jsp and register your admin user and password.

For any issues or help regarding red5 send a mail to linuxmaster007@gmail.com.

5 thoughts on “INSTALL RED5 IN A CENTOS CPANEL/WHM SERVER !

  1. Ammad

    just very simple red5 installation. please this link below.

    #cd /opt
    #wget gchats.com/downloads/red5-0.8.tar.gz
    #tar -zxf red5-0.8.tar.gz
    #rm -rf *.gz
    #cd red5
    #yum install nano
    #mv red5 /etc/init.d
    #sh red5.sh
    showing “Boot Start up to Complete” then press to Ctrl+C
    #mv red5 /etc/init.d
    #nano /etc/init.d/red5
    check it all lines and press Ctrl+X then enter
    #cd /etc/rc2.d
    #ln /etc/init.d/red5 S89red5 -s
    #cd ../rc3.d
    #ln /etc/init.d/red5 S89red5 -s
    #cd ../rc5.d
    #ln /etc/init.d/red5 S89red5 -s

    red5 installation completed.

    red5 start:
    #/etc/init.d/red5 start
    red5 check
    #/etc/init.d/red5 status
    red5 restart
    #/etc/init.d/red5 restart
    red5 stop
    #/etc/init.d/red5 stop

    red5 browser check
    http://yourip:5080

    showing blank page to installation is done

    Reply
  2. smith

    hi friends if you have a setup all types of live broadcasting setup guide please send me i can put your link in my website in sponsored thanks ………

    Reply
  3. Mohammad

    Hey! This is my first comment here so I just wanted to give a quick shout out and say
    I really enjoy reading your posts. Can you recommend any other blogs/websites/forums that go over the same
    subjects? Thanks a ton!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.