Let’s install the Red5 streaming application within 30mins!. You can blindly follow the below steps.
Before installing, we need to install a supported version of Java first. Please find a tutorial to install Java Install JAVA 8 on CentOS/Fedora/RHEL
After installing Java, go to “/opt”
cd /opt
Now we are ready to install Red5. You can download the latest version from here >> http://www.red5.org/downloads/
wget http://www.red5.org/downloads/red5/1_0_1/red5-1.0.1.tar.gz tar -xvf red5-1.0.1.tar.gz mv /opt/red5-server-1.0 /opt/red5
Let’s create an init file. For that, first, create a file called “/etc/init.d/red5” and add the script to it.
#!/bin/sh # Startup script for Red5 flash streaming server on RedHat/CentOS (cPanel) # chkconfig: 2345 95 55 # description: Red5 Flash Streaming Server # processname: red5 PROG=red5 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 # above is 0 if you copy paste from this blog and this does not work just replace o above by #zero 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
Make it executable and start the service.
chmod a+x /etc/init.d/red5 /etc/init.d/red5 restart
Make it start automatically at every reboot.
chkconfig red5 on
Open your browser and call the server as follows.
http://yourIP:5080
So that’s how you install Red5.