Installing RED5 Server on CentOS

First, download, extract and install:

mkdir /usr/local/red5; cd /usr/local/red5
wget http://www.red5.org/downloads/0_8/red5-0.8.0.tar.gz
tar -zxf red5-0.8.0.tar.gz

Install JAVA:

wget -O java.rpm.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=38657
chmod 755 java.rpm.bin; ./java.rpm.bin

Open new init script:

nano -w /etc/init.d/red5

Paste into init script:

#!/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

Activate init script:

chmod 755 /etc/init.d/red5
chkconfig red5 --add
chkconfig red5 on

Update settings which are located at:

/usr/local/red5/conf/*

Run it:

/etc/init.d/red5 start

One Response to Installing RED5 Server on CentOS

  1. True-Carders says:

    Hello sir unable to install Red 5 on Centos Can you help me out , i m just newbie . kindly contact me as soon as possible i want to make my own flash chat web hosting i have more then 5 dedecated Centose Servers i want to setup as flash chat hosting .. here is my email please contact me hackingxp@btinternet.com
    thanks you