How to Install Red5 0.9 on Ubuntu 10.04 LTS

string(14) "attribute >>>>" array(6) { ["width"]=> string(4) "1329" ["height"]=> string(3) "515" ["hwstring_small"]=> string(23) "height='49' width='128'" ["file"]=> string(49) "2010/09/Screen-shot-2010-09-05-at-10.42.23-PM.png" ["sizes"]=> array(3) { ["thumbnail"]=> array(3) { ["file"]=> string(49) "Screen-shot-2010-09-05-at-10.42.23-PM-150x150.png" ["width"]=> string(3) "150" ["height"]=> string(3) "150" } ["medium"]=> array(3) { ["file"]=> string(49) "Screen-shot-2010-09-05-at-10.42.23-PM-300x116.png" ["width"]=> string(3) "300" ["height"]=> string(3) "116" } ["large"]=> array(3) { ["file"]=> string(50) "Screen-shot-2010-09-05-at-10.42.23-PM-1024x396.png" ["width"]=> string(4) "1024" ["height"]=> string(3) "396" } } ["image_meta"]=> array(10) { ["aperture"]=> string(1) "0" ["credit"]=> string(0) "" ["camera"]=> string(0) "" ["caption"]=> string(0) "" ["created_timestamp"]=> string(1) "0" ["copyright"]=> string(0) "" ["focal_length"]=> string(1) "0" ["iso"]=> string(1) "0" ["shutter_speed"]=> string(1) "0" ["title"]=> string(0) "" } } array(0) { }

If they aren’t already installed, add the following to /etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

Then, install some required libraries

apt-get update
apt-get install java-package
apt-get install sun-java6-jdk
apt-get install sun-java6-jre
apt-get install ant
apt-get install subversion

Now, download and install Red5

wget http://www.red5.org/downloads/0_9/red5-0.9.1.tar.gz
tar xvfz red5-0.9.1.tar.gz
mv red5-0.9.1 red5
mv red5 /usr/share/

Let’s try running it now:

cd /usr/share/red5
sh red5.sh

You should see a bunch of text appear, the last line looking like:

[INFO] [Launcher:/installer] org.red5.server.service.Installer – Installer service created

Now try going to http://your-server-address:5080 in a web-browser. You should see:


Have fun with Red5!

  • Leave a Comment

  • Satya

    Hi Nicky,
    thank you very very much.
    I had tried with many other blogs…. but I was unable to do in any of those.
    I had tried for the last 10 days, some nights without sleep even. But the info you have provided helped me to get it done in 1 try only.

    I think I should be in touch with you. I need your help.

    Thanking you again,
    Satya

  • Satya

    When I am clicking on install, it is taking me to
    http://10.12.99.99:5080/installer/ (Red5 Application Installer), but showing the list empty. and in the debug message, I am getting
    Host: 10.12.99.99
    Trying to connect
    Net status: NetConnection.Connect.Success
    Got the application list
    Got the application list

    It seems everything is ok.

    But in the first page, it shows
    You must install the demo applications before running them.
    I am very much new to this. But I want to see something running perfectly. So that I can try to build some new applications after getting motivated by the demo.

    Please please help me

  • http://blog.tumbledesign.com/ Nicky Hajal

    Satya,

    So glad we could help! I know what you mean about staying up all night on a problem like this – it can be so frustrating!

    I’m still feeling my way around Red5 too, but happy to help all I can.

    -Nicky

  • http://blog.tumbledesign.com/ Nicky Hajal

    Satya,

    Is this what your install page looks like?

    http://imgur.com/CpKo8.png

    If not, care to post a screenshot?

    What happens when you try to install an application? Install OflaDemo for a great example of what Red5 is capable of.

    Let me know how things go and if you have any more problems, upload a screenshot to imgur.com so we can really take a look at what’s going on.

    -Nicky

  • Satya

    This is how my install page looks like http://i.imgur.com/PafoR.png

    I think I am missing something as the install page is blank, it seems nothing is there in its path to be installed.

    If this is the case, then kindly tell me as a beginner, how can i download a sample application and install it successfully.

    Actually, I have downloaded the example source from svn trunk. but I don’t know where to place that complete trunk.

    Thanks for your prompt reply.

    Satya

  • http://blog.tumbledesign.com/ Nicky Hajal

    Hey Satya,

    So strange about the empty list! Hm.

    What’s in your /usr/share/red5/webapps and your /usr/share/red5/webapps/root/demos folder?

    Any example sources should go in /webapps and /root is the webroot, so that’s where your client side .html/.swf should go if you want to access it from localhost:5080/

    What exactly is your setup? Are you running Ubuntu virtualized somehow? Just trying to figure out what’s different about your setup compared to mine.

    -Nicky

  • http://blog.tumbledesign.com/ Nicky Hajal

    What happens when you click ‘list’?

  • Satya

    The contents of the asked folders can be seen at http://imgur.com/WijDL.png

    I am using Oracle Virtual Box, both Host and Guest OS are Ubuntu 9.04 Desktop edition. I am setting up RED5 in the Guest OS.

  • Satya

    Same empty list

  • Satya

    audiotranscoder & videotranscoder files in the webapps directory are from xuggle, which does no harm to RED5. These are some demo basic applications which will run on RED5 server.

  • http://blog.tumbledesign.com/ Nicky Hajal

    Hey, sorry to give such short replies – how I would debug this, though, is to keep making tons of changes as quickly as possible to sniff out the bug and get to where I want to be. Ok, here’s a link to the oflaDemo server side code http://drop.io/0u2oigt – try putting the whole oflaDemo folder (unzipped) into /user/share/red5/webappsThen try:http://localhost:5080/demos/ofla_demo.htmlandhttp://localhost:5080/demos/publisher.htmlThose should work fine! Give it a try and let me know what happens.-Nicky

  • Satya

    I am able to see demos. There is no issue.
    But when I click install, I see the empty list.

    The link you have provided for oflademo can’t be retrieved from my network. Is there any issue with authenticated proxy.

    Now I am going to try with a fresh Ubuntu 10.04. I shall communicate to you whatever I shall experience there.

    Satya

  • Satya

    one more info….
    when I click list, in the terminal, I can see the following error message
    [ERROR] [NioProcessor-1] org.red5.server.service.Installer – Unable to connect to http://red5.googlecode.com/svn/snapshots/

  • Paisal

    Thank you very much

  • http://blog.tumbledesign.com/ Nicky Hajal

    Satya,

    This must be the problem and I’m sure it has something to do with the authenticated proxy.

    I wonder what happens when you do

    traceroute red5.googlecode.com

    Either way, all you need to do is copy the server side code into /webapps and it should work fine! Where can I upload files that you’ll be able to receive them?

  • Satya

    Hi Nicky,

    Today I tried to download that oflaDemo again … and I could be able to do as you have written. Now I am able to view demo movie trailers.

    Thanks a lot.
    But still list is empty. Anyway I am able to see the demos.

    I am happy that after so many days’ struggle now I am able to see the demos.

    Hey I question. Am I going to face any problem due to proxy, if I try to write my own application.

    It will be better for me, If you can send me some initiative code to start with, or a good reference link from where I can start with.

    And traceroute result is something like the following

    satya@satya-bbb:~$ traceroute red5.googlecode.com
    traceroute to red5.googlecode.com (209.85.153.82), 30 hops max, 60 byte packets
    1 router.hostel12.iitb.ac.in (10.12.250.1) 0.000 ms 0.000 ms 0.000 ms
    2 192.0.50.2 (192.0.50.2) 16.051 ms 16.540 ms 16.559 ms
    3 ifwa-201.iitb.ac.in (10.201.250.100) 17.108 ms 17.645 ms 17.658 ms
    4 * * *
    5 * * *
    6 *

    Thanking you again,
    Satya

  • Satya

    Hi,
    I found out why I am getting empty list.
    Again PROXY is the culprit.
    after I set proxy for jvm, I got an ERROR in the debug info.
    I shall send you the error number next time
    ~satya

  • Satya

    After setting up proxy for jvm, the result of clicking over install is
    http://imgur.com/g34eC.png

  • Satya

    After setting up proxy for jvm, the result of clicking over install is
    http://imgur.com/g34eC.png

  • Satya

    After setting up proxy for jvm, the result of clicking over install is
    http://imgur.com/g34eC.png

  • Satya

    After setting up proxy for jvm, the result of clicking over install is
    http://imgur.com/g34eC.png

  • Satya

    After setting up proxy for jvm, the result of clicking over install is
    http://imgur.com/g34eC.png

  • Satya

    Do we need to set JAVA_HOME, ANT_HOME, RED5_HOME, and PATH ???

  • http://twitter.com/jwcounts Jared Counts

    Very nicely done! Using your instructions, I got Red5 up and running on Ubuntu 9.04, but when I restarted the box to make sure that Red5 would run at startup, I was greeted with this:

    Exception in thread “main” java.lang.NoClassDefFoundError: org/red5/server/Bootstrap
    Caused by: java.lang.ClassNotFoundException: org.red5.server.Bootstrap
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: org.red5.server.Bootstrap. Program will exit.

    Any ideas? I can run red5.sh from /usr/share, but it won’t cooperate when I try to run /etc/init.d/red5.sh. Thanks!

  • http://twitter.com/jwcounts Jared Counts

    Oops, nevermind, found a solution. Apparently the bootstrap is located in the boot.jar file, so if anyone else is having this problem, do this:

    export CLASSPATH=/usr/share/red5/boot.jar

  • FatButtLarry

    This is great. Thank you!

  • Manuel Cardona

    Hi Nicky, I rent a server on 1&1, they just have the Ubuntu 8.04 LTS minimal versión. I tried your info. …and IT WORKS too on Ubunto 8.04. I didnt change the source.list.

  • http://blog.tumbledesign.com/ Nicky Hajal

    No prob, Larry!

  • http://blog.tumbledesign.com/ Nicky Hajal

    Hey Jared,

    Thanks a lot for coming back and adding the solution here!

    -Nicky

  • http://blog.tumbledesign.com/ Nicky Hajal

    Great news, thanks Manuel!

  • Lunya

    Jared Counts,
    Sorry for stupid question but I just started working with ubuntu and have the same issue (red5 doesn’t start at startup). Could you explain where I have to add “export CLASSPATH=/usr/share/red5/boot.jar ”
    Actually, I was trying to add this line in “/etc/init.d/red5.sh” before “export RED5_CLASSPATH=”${RED5_HOME}/boot.jar${P}${RED5_HOME}/conf${P}${CLASSPATH}””
    but it doesn’t work for me 🙁

  • http://blog.tumbledesign.com/ Nicky Hajal

    Lunya,

    Just run export CLASSPATH=/usr/share/red5/boot.jar in your terminal. 🙂 You’re setting an environment variable.

    http://en.wikipedia.org/wiki/Environment_variable
    http://download.oracle.com/javase/tutorial/essential/environment/paths.html

    -Nicky

  • Lunya

    Nicky,
    Thanks for answering!
    I met another few issues. See screenshot: http://imgur.com/KdF7h.png
    1. In some reason variable CLASSPATH is not saved in Ubuntu’s variables. Cause each time when restart Ubuntu this variable is emty.

    2. When I set CLASSPATH variable and try to run red5.sh it gives me lines:
    Running on Linux
    Starting Red5
    Red5 root: /etc/init.d
    Configuation root: /etc/init.d/conf
    Exception in thread “main” java.lang.NullPointerException
    at org.red5.classloading.ClassLoaderBuilder.build(ClassLoaderBuilder.java:170)
    at org.red5.classloading.ClassLoaderBuilder.build(ClassLoaderBuilder.java:97)
    at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:126)
    at org.red5.server.Bootstrap.main(Bootstrap.java:50)

    Thanks for any advice !

  • derekdon

    Just wondering if the Make Red5 Run at Startup steps are correct as they don’t seem to make sense to me? Why create a new script /etc/init.d/red5.sh and add those 3 lines to it if you are then just going to override it by copying the red5.sh script from /usr/share/red5 to /etc/init.d/
    Maybe I’m missing something?

  • tommy

    my ubuntu can’t shut down after installing red5, but thanks for this anyway

  • tommy

    ubuntu can’t shutdown if I use the 3 lines, have to copy red5.sh over.

  • Slimandslam

    I followed your instructions exactly on Ubuntu 10.4 LTS and
    it seems to work.
    However, I cannot get the web page to come up. It just hangs.
    I started with the “official” amazon EC2 ubuntu image. Here are
    my tables…..thoughts?

    prompt> iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp — anywhere anywhere tcp dpt:1935
    ACCEPT tcp — anywhere anywhere tcp dpt:5080
    ACCEPT tcp — anywhere anywhere tcp dpt:omniorb
    ACCEPT tcp — anywhere anywhere tcp dpt:8443

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

  • Pingback: Kaltura CE 3.0 and Red 5

  • http://twitter.com/inetcreators INet Creators

    I’ve the same question. Did you finally get regarding what actually needs to be done in the section.

  • Stinkstinkstink

    Thanks boss.

  • Ovi

    The startup script is not working … please edit the post … Everything it’s ok but the startup script.

  • http://blog.tumbledesign.com/ Nicky Hajal

    Thanks Ovi, I’ve removed it for now.

  • Ali

    Thanks a lot for this blog, I highly appreciate it.

  • fahime

    hello
    thank you very much
    I try to install red5 from your blogs and see the test page(high picture),but when I try to install ready-made application show an empty list and got an error like this page,please help me

  • Juan

    Hi thanks for this tutorial, but i have a problem, i am running red5 on a server using Dyndns service ( in my home with dynamic ip) when i access from local there is no problem but when i access from any computer outside it load all the red5 site perfect but no videos loading, i can’t connect to install app, it says connecting to myaddress.dyndns.org and stays like that! i want to work first in my server for delvelp! but access from outside

    Help me,
    thanks

  • http://blog.tumbledesign.com/ Nicky Hajal

    Could it be an issue with ports, Juan?

    Red5 says:
    ————————–

    Red5 uses the following default ports. Ensure that your firewall do not block them:
    Default ports:1935,8088,5080,1936
    RTMP: 1935
    RTMPT: 8088
    HTTP servlet engine port: 5080
    Debug proxy port: 1936

  • Moti

    hello
    tank you very much for your helps
    I  had installed red5 .but when I try to install application from the first page that you said, show me empty list and get me #1085 error and button disabled .
    I had tried with this problem for the last 4 weak and. I need your help
     

  • German

    Thank you very much, works perfectly, Greetings

  • peperone

    Simple questions, do you really need to apt-get suversion and ant? It looks to me like you are not building from source, just unpacking the tar and going from there?

  • Babasaheb Shinde

    how to set proxy username and password in red5.sh