Announcement Announcement Module
Collapse
No announcement yet.
Install Red5 Flash Media server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Install Red5 Flash Media server

    Installing a Red5 Flash media server in a VPS or Dedicated server environment.

    yum -y install subversion
    Install Java http://www.java.com/en/download/help/linux_install.xml

    # cd /usr/local/src
    # wget http://archive.apache.org/dist/ant/b...8.2-bin.tar.gz
    # tar zxvf apache-ant-1.8.2-bin.tar.gz
    # mv apache-ant-1.8.2 /usr/local/ant

    Setup Environment Variables

    # export ANT_HOME=/usr/local/ant
    # export PATH=$PATH:/usr/local/ant/bin
    # echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrc
    # echo ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrc

    Download and Extract Red5

    # cd /usr/src/red5
    # wget http://www.red5.org/downloads/red5/0...5-0.8.0.tar.gz
    # tar -xzvf red5-0.8.0.tar.gz
    # rm -f red5-0.8.0.tar.gz
    # cd ..
    # mv red5 /opt/

    # cd /opt/red5
    # chmod 755 red5.sh
    # chmod 755 red5-shutdown.sh

    How to start Red5

    # ./red5.sh > start.log &

    Check whether the port is listening

    netstat -tlpna | grep 5080

    Now we will create init script for red5 to start, stop and restart easily.

    # vim /etc/init.d/red5

    #!/bin/bash
    # For RedHat and cousins:
    # chkconfig: 2345 85 85
    # 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
    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

    red5 should now run port 5080 and rtmp service on port 1935. You may need to open these ports in your server firewall.

    iptables -A INPUT -p tcp -m tcp –dport 5080 -j ACCEPT
    iptables -A INPUT -p tcp -m tcp –dport 1935 -j ACCEPT


    Now Change the permission for the script and start red5

    chmod +x /etc/init.d/red5


    /etc/init.d/red5 start

    Access Red5 Web Interface

    You can access the admin interface from http://yourserver.com:5080/

    Open following url in your web browser to get demo apps install screeen.

    Then to you need to register the username and password from the following link.http://your-server:5080/admin/register.html

    After that you can check it from the link http://your-server:5080/admin/ with server ip and the registered username, password.
Working...
X