Install Red5 1.0 on CentOS Latest


Hits: 28350  

1. Install Java

# yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

2. Install Ant

# cd /usr/local/src
# wget http://red5.svnlabs.com/apache-ant-1.8.2-bin.tar.gz
# tar zxvf apache-ant-1.8.2-bin.tar.gz
# mv apache-ant-1.8.2 /usr/local/ant

3. Export path for Ant and Java

Make sure you have right paths (java, ant etc.) on your server, I have used 32-bits CentOS server … home path might be different on 64-bits or other server 😉

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

Also add these lines in /etc/bashrc at last to available every-time logged in to SSH

4. Install SVN

# yum install subversion

5. Install RED5 Server

# cd /usr/local/src
# svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5
# mv red5 /usr/local/
# cd /usr/local/red5
# ant prepare
# ant dist

6. Copy Red5 files

# cp -r dist/conf /usr/local/red5

7. Test Run

# sh red5.sh

ctrl + z

You need to allow port 5080 and 1935 to 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

Red5 Server Status

# netstat -anp | grep 5080
# ps aux | grep red5

http://yourserver.com:5080/

If you have CentOS 64-bits server and you are getting error like

– Buildfile: build.xml does not exist!
– BUILD FAILED
– Cannot allocate memory

You might need to checkout modified files
# cd /usr/local/src
# svn co http://red5.googlecode.com/svn/java/server/tags/1_0/ red5

Build Failed (Life saver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Cannot run program “chmod”: java.io.IOException: error=12, Cannot allocate memory

# export _JAVA_OPTIONS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’
# export ANT_OPTS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’

Try solution here… http://code.google.com/p/red5/issues/detail?id=337

How to install Red5 Demos?

# cd /usr/local/red5/webapps/root
# svn checkout http://red5.googlecode.com/svn/java/server/tags/0_9_1/webapps/root/demos/

Then go to http://yourserver.com:5080/demos/

Please check all comments below for more help 😉

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch

49 thoughts on “Install Red5 1.0 on CentOS Latest”

  1. oflaDemo not working =?>  Copied META-INF, WEB-INF, streams, loggertest.jsp  From Working examples  😉

  2. BUILD FAILED
    /usr/local/red5/build.xml:209: The following error occurred while executing this line:
    /usr/local/red5/build.xml:230: Error running /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/javac compiler

  3. service WowzaMediaServer status  (if exists and running)

    Could not start Red5 oflaDemo-> oflaDemo installed but folder emptyred5 dead but pid file exists 
    rtmp.RTMPHandler – Scope oflaDemo not found /var/log/messages

  4. Hi Verma,
    Could you help me with my problem?
    I’ve installed the latest version of ant 1.8.4, installed RED5 0.91. 
    I have a CentOS 5.8 dedicated server with 512mb ram.
    I applied this code “export _JAVA_OPTIONS=”-Xms32m -Xmx128m”

    But in the end after I input “ant dist”, i always get these error:
    /usr/local/red5/build.xml:217: The following error occurred while executing this line:/usr/local/red5/build.xml:238: Error running /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/javac compilercould you help me with this please? It’s driving me crazy 🙁

  5. Followed this guide exactly (except ant is now 1.8.4 not 1.8.2), then went to my server port 5080 and it just “loads” forever.   iptables is turned off completely.  What could be going on?

    netstat results:

    [root@myserver:twitter  red5]# netstat -anp | grep 5080
    tcp        0      0 :::5080                     :::*                        LISTEN      14081/java
    tcp      343      0 ::ffff:192.168.2.111:5080   ::ffff:***.***.***.***:61186 ESTABLISHED –
    tcp      343      0 ::ffff:192.168.2.111:5080   ::ffff:***.***.***.***:60670 ESTABLISHED –
    tcp      294      0 ::ffff:192.168.2.111:5080   ::ffff:192.168.2.2:60699    ESTABLISHED –
    NOTE: (added *** to protect actual IP)

    ps results:

    [root@myserver:disqus  red5]# ps aux | grep red5
    root     14081  0.4  6.6 2324248 243864 pts/0  Tl   08:59   0:07 /usr/lib/jvm/java/bin/java -Dpython.home=lib -Dred5.root=/usr/local/red5 -Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector -Dcatalina.useNaming=true -Djava.security.debug=failure -cp /usr/local/red5/boot.jar:/usr/local/red5/conf:.:/usr/lib/jvm/java/lib/classes.zip org.red5.server.Bootstrap
    root     15126  0.0  0.0 103232   860 pts/0    R+   09:28   0:00 grep red5

  6.  I used the init script below and now I can get to the Red5 default page at myserver:5080, however the small test video on that page is just black.   What could be causing this?  How can I determine what is causing this?

  7. my process was ran perfectly till step 6.
    in some point of step 7; it says following.
    what may be the problem and how i get this job done?

    org.springframework.remoting.rmi.RmiRegistryFactoryBean – Unexporting RMI registryException org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.core’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.FatalBeanException: Editor class not found; nested exception is java.lang.ClassNotFoundException: org.apache.mina.integration.beans.InetSocketAddressEditor

    in step 3 i type these four lines also and run.

    echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrcecho ‘export JAVA_HOME=/usr/lib/jvm/java’ >> /etc/bashrcecho ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrcecho ‘export CLASSPATH=.:$JAVA_HOME/lib/classes.zip’ >> /etc/bashrc 

    Thanks

  8.  4GB

    The issue was just that I installed the Red5 on a different server than I was accessing it from and all of the client demos (including the box on the test page) try to access RTMP@localhost:twitter.  So, the client demos only work if you’re accessing them from the same computer Red5 is installed on.   

    I was able to upload my own Red5 Server app to the server and it worked great.

  9. seems your issue has been fixed. can you tell me did u followed above guide fully when installing red5? is there some change?

  10. I did everything exactly as u said and I get this error after running red5.sh

    Exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.common’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘statusObjectService’ defined in class path resource [red5-common.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/mina/core/buffer/IoBuffer

  11. Solved.

    Instead of using Red5 subversion download as described on the guide I downloaded Red5 RC1 on the official page and it works!

  12. I also encountered this kind of problem, how to solve? Solve method can send my mailbox? 894988965 @qq.com

  13. Exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.common’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘statusObjectService’ defined in class path resource [red5-common.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/mina/core/buffer/IoBuffer
    ??????????I encountered this kind of problem, how to solve?The teacher can put the solution to my mailbox? 894988965 @qq.com thank you!

  14. You are in/usr/local/red5 directory decompression of red5? Want to install look at red5. Sh is executable file green color files

  15. yes it is green color. but i am not talking aout red5 folder. after go to red5 then type cd dist and press enter. you will get into dist folder then you can see another red5.sh green color file there also
    so excute it using this command ./red5.sh

    good luck and reply result

  16. Hello ALL ,
    this is the error im getting when I try to run sh red5.sh or ./red5.sh in the /usr/local/red5/dist folder. 

    —-error from copied page —-
    … 53 common frames omitted[INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory – Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@54083e1e: defining beans [placeholderConfig,red5.server,rmiRegistry,mbeanServer,org.springframework.jmx.support.ConnectorServerFactoryBean#0,mbeanExporter,serializer,deserializer,minaEncoder,minaDecoder,statusObjectService,rtmpCodecFactory,rtmptCodecFactory,remotingCodecFactory,streamableFileFactory,filePersistenceThread,sharedObjectService,streamService,providerService,consumerService,schedulingService,warDeployService,remotingClient,object.cache,keyframe.cache,flv.impl,flvreader.impl,mp4reader.impl,mp3reader.impl,org.springframework.beans.factory.config.MethodInvokingFactoryBean#0,org.springframework.beans.factory.config.MethodInvokingFactoryBean#1,streamExecutor,fileConsumer,playlistSubscriberStream,clientBroadcastStream]; root of factory hierarchy[INFO] [main] org.springframework.jmx.support.ConnectorServerFactoryBean – Stopping JMX connector server: javax.management.remote.rmi.RMIConnectorServer@785e8d7d[INFO] [main] org.springframework.remoting.rmi.RmiRegistryFactoryBean – Unexporting RMI registry[INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory – Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@193936e1: defining beans [placeholderConfig,red5.common,red5.core,context.loader,pluginLauncher,tomcat.server]; root of factory hierarchyException org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.common’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘mbeanExporter’: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘schedulingService’ defined in class path resource [red5-common.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
    ……—-
    don’t know what to do now … so any help please email me whatkai@yahoo.com . and post here to help others 

  17. Hello,

    Doing everything as you said. But constantly having trouble with an error like this ..

    Checked out revision 4541.
    [root@srv src]# mv red5 /usr/local/
    [root@srv src]# cd /usr/local/red5
    [root@srv red5]# ant prepare
    Buildfile: build.xml does not exist!
    Build failed

    The files looks as follows;

    [root@srv red5]# ls -l
    total 32
    -rw-r–r– 1 root root  1871 Jan 24 13:57 build.properties
    -rw-r–r– 1 root root  1324 Jan 24 13:57 license.txt
    -rw-r–r– 1 root root 19926 Jan 24 13:57 pom.xml
    drwxr-xr-x 5 root root  4096 Jan 24 13:57 src

    The correct version of Java installed,

    ant 1.8.4 installed,

    Svn board,

    System is not installed anything else.

    My system, CentOS 6 64-bit. There directadmin.

    Regards,
    Erkan

  18. Make sure you have right paths (java, ant etc.) on your server, I have used 32-bits CentOS server … home path might be different on 64-bits or other server  😉

  19. Hi,

    OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-1.50.1.11.5.el6_3-x86_64)OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

    Apache Ant(TM) version 1.8.4 compiled on May 22 2012

    And I’m sure it’s the right home paths ..

    I think I do not have any idea? 🙂

    Thanx

  20. Bonjour , pour l’installation vous avez plus simple fiable et garanty a 100%

    Quel et le prix ?
    Gratuit !
    Ya t’il une inscription ?
    NON
    Comment faire dans ce cas ?

    Ouvré une console SSH

    Command 1 :
    wget http://tchat200.heberg.fr/install/red5.sh
    Command 2 :
    chmod 777 red5.sh
    Command 3 :
    sh red5.sh

    Ensuite ?
    allez boire votre café en attendent que l’installation ce termine

    En cas de probléme admin@tchatlove.fr << envoyer mon un email je vous aiderai sous quelques minutes et gratuitement

  21. Can you tell me why this happeded when tring to install?
    $ ant prepare
    Buildfile: build.xml does not exist!
    Build failed

    instead of Bulid successfull.

  22. Pingback: abest site
  23. Pingback: Sälja fakturor
  24. It’s perfect time to make some plans for the future and it is time to be happy.
    I have read this post and if I could I want to suggest you some interesting
    things or advice. Perhaps you can write next articles referring to this article.
    I desire to read more things about it!

  25. When someone writes an post he/she keeps the thought of a user in his/her brain that how a user can understand it.
    So that’s why this article is amazing. Thanks!

  26. Woah! I’m really enjoying the template/theme of
    this blog. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between user friendliness and appearance.
    I must say you’ve done a great job with this. Additionally, the blog
    loads extremely quick for me on Chrome. Outstanding Blog!

  27. Nice post. I learn something new and challenging on websites I stumbleupon every day.

    It’s always helpful to read through articles from other writers and
    practice something from their websites.

  28. Heya i am for the first time here. I came across this board and I find It really useful
    & it helped me out a lot. I hope to give something back and
    help others like you helped me.

Leave a Reply

Your email address will not be published.

*