You need to install Apache Tomcat on your server in order to install Red5. You can install Tomcat by using easyapache script in cPanel.
/scripts/easyapache
One it is installed, please proceed with the following steps to install Red5 on cPanel server.
cd /usr/local/src wget https://github.com/Red5/red5-server/releases/download/v1.0.7-RELEASE/red5-server-1.0.7-RELEASE.tar.gz tar xvzf red5-server-1.0.7-RELEASE.tar.gz mv red5-server /usr/local/red5
You need to add a start-up script. Create a file “/etc/init.d/red5” using vim editor.
vim /etc/init.d/red5
Add the following contents into it.
# !/bin/sh # Startup script for Red5 # 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 "" 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)
# !/bin/sh # Startup script for Red5 # 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" RETVAL=1 esac exit $RETVAL
stop
# !/bin/sh # Startup script for Red5 # 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" RETVAL=1 esac exit $RETVAL
start ;; status) status $PROG -p $PIDFILE RETVAL=$? ;; *) echo $"Usage:
# !/bin/sh # Startup script for Red5 # 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" RETVAL=1 esac exit $RETVAL
start" RETVAL=1 esac exit $RETVAL
Make the start-up script file executable.
chmod a+x /etc/init.d/red5
Enable the red5 daemon on chkconfig. It will make sure the red5 daemon automatically start after the server reboot.
chkconfig --add red5 chkconfig red5 on
Start the red5 daemon.
/etc/init.d/red5 start
Make these ports accept connections: 1935, 1936, 5080, 8088 on your server firewall.
Please call the following url on your web browser to verify the installation.
http://YOUR_IP_ADDRESS:5080/
Change YOUR_IP_ADDRESS with your server IP address.