Saturday, September 5, 2015

Ok, this is Red5 on CentOS 7

How-to install Red5 server on CentOS 7
You asked - i did it.

First of all, you have to update the system
# yum update -y

Then, install openjdk 1.8.0
# yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel -y




Install Ant
cd /usr/local/src
# wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.6-bin.tar.gz
# tar zxvf apache-ant-1.9.6-bin.tar.gz
mv apache-ant-1.9.6/ /usr/local/ant

Exports
# wget http://obed.am/export-red5.sh
# sh export-red5.sh

Download and install Red5
# wget http://obed.am/red5-server-1.0.4-RELEASE-server.tar.gz
# tar zxvf red5-server-1.0.4-RELEASE-server.tar.gz
# mv /usr/local/src/red5-server-1.0.4-RELEASE /usr/local/red5

Install init script
# wget -O /etc/systemd/system/red5.service http://obed.am/red5.service
# chmod +x /etc/systemd/system/red5.service
# systemctl enable red5.service

Usage
# systemctl start red5.service
# systemctl stop red5.service
# systemctl restart red5.service

Test the result
Go to http://yourserver.com:5080/demos/ofla_demo.html to test Red5 Server over RTMP

That's all. Feel free to ask anything. 
#red5 #java #linux #centos7 #centos #flash #streaming #rtmp 

18 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi, Thanks very much for this. I found it difficult to find a help page that worked as well as the instructions here.

    I couldn't get Red5 to work on Ubuntu so switched to CentOS and after finding this page and following your instructions, it worked like a charm - Thanks again!

    ReplyDelete
  3. i have suceessfully installed but when i take demo it's show NetConnection.Connect.Failed.. what can i do plzz help..

    ReplyDelete
    Replies
    1. You have to go to :5080 and install the demo apps first.

      Delete
  4. Well done. Kickass instructions!

    ReplyDelete
  5. I would also like to know why Ant is needed?

    ReplyDelete
  6. Replies
    1. he means the links on http://obed.am/ and he's right, they're all 404

      either way, here they are:

      https://github.com/Red5/red5-server/releases/download/v1.0.7-RELEASE/red5-server-1.0.7-RELEASE.tar.gz


      https://raw.githubusercontent.com/Red5/red5-service/master/src/main/daemon/red5

      Delete
    2. the exports are missing because obed.am is dead. these are the exports:

      export ANT_HOME=/opt/ant
      export JAVA_HOME=/usr/lib/jvm/java
      export PATH=$PATH:/usr/local/ant/bin
      export CLASSPATH=.:$JAVA_HOME/lib/classes.zip
      export RED5_HOME=/usr/local/red5

      echo 'export ANT_HOME=/opt/ant' >> /etc/bashrc
      echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
      echo 'export PATH=$PATH:/usr/local/ant/bin' >> /etc/bashrc
      echo 'export CLASSPATH=.:$JAVA_HOME/lib/classes.zip' >> /etc/bashrc
      echo 'export RED5_HOME=/usr/local/red5' >> /etc/bashrc

      i also had to install jsvc on Centos 7.2 minimal since its called in the red5 daemon.
      yum install jsvc -y

      those issues took all night so i hope i save you some time.

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. very good tutorial. Can you do one on streaming movies to red5 server ?

    ReplyDelete