instal Red-5









#      yum install java-1.7.0-openjdk.x86_64
#      yum install java-1.7.0-openjdk-devel
#      yum install java
#      cd /root
#      cd /opt/
#      wget gchats.com/downloads/red5-1.0.0.tar.gz
#      tar -zxf red5-1.0.0.tar.gz
#      cd red5
#      yum install nano -y
Now that you have downloaded Red5, you need to add an auto startup script. To do so, we will edit /etc/init.d/red5 file and add the auto startup script using the following line.
# nano /etc/init.d/red5
***********************************************
#! /bin/sh
# For RedHat and cousins:
# processname: red5
cd /opt/red5
PROG=red5-highperf
RED5_HOME=/opt/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: "
           $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
*****************************************************************************
Hit Ctrl+w to write out the contents in the nano and then press Ctrl+x to exit. Now you need to add execute permission to this file using the following command.


# chmod a+x /etc/init.d/red5




Now run the following codes to make sure Red5 starts whenever you reboot your system.

# 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
# /etc/init.d/red5 restart