Red5 on DreamhostPS

This weekend I installed Red5 on my DreamhostPS account.  Note: You do need Dreamhost PS to run Red5 because it is a persistent process.  Non-PS accounts don’t allow persistent processes and it will be killed.  Here is what I did:

  1. I made a new user – just to keep all of the red5 stuff quarantined from the rest of my stuff.
  2. SSH in as that user: ssh your-user@yourdomain.com
  3. Add the following lines to the .bash_profile for that user:
    export JAVA_HOME=/usr/local/dh/java
    export ANT_HOME=$HOME
    export PATH=$PATH:$ANT_HOME/bin
  4. Make a directory called ‘source’ and enter it..
    mkdir source && cd source
  5. You need ant to build Red5, so download it into your source folder:
    wget http://www.bizdirusa.com/mirrors/apache/ant/binaries/apache-ant-1.8.0-bin.tar.gz
  6. Unzip it
    tar -xvf apache-ant-1.8.0-bin.tar.gz
  7. Move the ‘bin’, ‘etc’ and ‘lib’ folders to $HOME
  8. svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5-read-only
  9. cd source/red5-read-only/
  10. ant ivyclear dist
  11. cd dist/
  12. chmod 755 red5.sh
  13. screen
  14. ./red5.sh
  15. Now you should be able to access a test page at http://yourdomain.com:5080/ and the endpoint for your services will be rtmp://yourdomain.com:1935/yourAppName (the ‘:1935′ might be redundant, but just to be safe)

I am still working on making a simple recording tool, but this will at least get the server running.  Comments/complaints welcome!

This entry was posted in Howtus. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. Justin Martin
    Posted April 6, 2010 at 1:10 am | Permalink

    I tried to follow these steps (exactly) but I got two errors:

    The first when I ran
    ant ivyclear dist

    No dist folder is created and I get bash: ant: command not found

    The second after I run ./red5.sh:
    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:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: org.red5.server.Bootstrap. Program will exit.

    Any idea what is causing these errors?

  2. Posted May 23, 2010 at 1:45 pm | Permalink

    This works great! Thanks for taking the time to write these instructions…

    I would add a step after step 3 to properly load the variables in the session. I don’t remember the command for that, so I just logged out and ssh in again.

  3. Posted October 18, 2010 at 6:17 pm | Permalink

    Hey! Getting similar issues to #1 – admittedly NOT commend-line savvy. Build errors happen after ‘ant ivyclear dist.’

    Any help you could offer would be great.

  4. Jeff
    Posted October 19, 2010 at 3:22 pm | Permalink

    Is it possible at all to do live streaming on a dreamhost ps? I just was told by tech support they only allow http stremaing…? Is it working for anyone?

    Thanks

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>