As part of my Rails Rumble team prep, I wanted to document the quickest way to get a Red5 Flash media server up and running on a virtual private server. The Rails Rumble project will actually be using a Linode cloud server, but since I already have a Slicehost account, I did this experimentation on Slicehost.
sudo nano /etc/apt/sources.list deb http://za.archive.ubuntu.com/ubuntu/ jaunty multiverse apt-get update
apt-get upgrade
apt-get install locate
updatedb &
apt-get install htop wget screen telnet subversion apt-get install java-package
apt-get install sun-java6-jdk
apt-get install sun-java6-jre
apt-get install ant root@red5Test:/etc/apt# which java
/usr/bin/java
root@red5Test:/etc/apt# java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode) cd ~
mkdir temp
cd temp
svn co http://red5.googlecode.com/svn/java/server/trunk red5
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.13/
export ANT_HOME=/usr/share/ant/
cd red5
/usr/share/ant/bin/ant
mkdir /usr/share/red5
cp -R ./dist/* /usr/share/red5/
cd /usr/share/red5
chmod 755 red5.sh /usr/share/red5/red5.sh & root@red5Test:/usr/share/red5# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
...
tcp6 0 0 :::5080 :::* LISTEN
... root@red5Test:/usr/share/red5# telnet localhost 5080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
23 Responses to Getting RED 5 up and running on Ubuntu 9.04
Chris Lee
July 29th, 2009 at 5:30 pm
Awesome walk through, works perfectly!
Chris Lee
July 31st, 2009 at 2:43 pm
Just a note that I also had to do this after my red5 installation mysteriously died and wouldn’t start up again:
export RED5_HOME=/usr/share/red5/
How to get Red5 running on Ubuntu 9.04 | Csatpk! CS & IT Solutions
August 17th, 2009 at 1:48 pm
[...] source here [...]
Mark
September 7th, 2009 at 4:37 pm
Thanks for the great how to. It is the best I have seen. Chris Lee is correct is his post here. My red5 install would nnot start after a restart.
Now if soomneone would publish a “how to live stream”
Red5 is horribly undocumented.
Mark
September 7th, 2009 at 5:20 pm
Anyone know why I see
[INFO] [NioProcessor-1] org.red5.server.net.rtmp.RTMPHandler – Scope oflaDemo not found on 67.19.107.126
[WARN] [Red5_Scheduler_Worker-5] org.red5.server.net.rtmp.RTMPConnection – Closing RTMPMinaConnection from 189.182.27.62 : 3239 to 67.19.107.126 (in: 3266 out 3215 ), with id 6997525 due to long handshake
after this install?
Also, why must I enter
export RED5_HOME=/usr/share/red5/
at the terminal every time before starting the server?
should the oflaDemo install a folder in webappps?
I have been all over the net and find no answers.
Thanks
Mark
September 7th, 2009 at 5:21 pm
I forgot that in my last post that is attempting to connect with FME 2.5
How To articles on setting up Red5 « Dominick Accattato, CTO Infrared5
January 14th, 2010 at 10:50 am
[...] Setting up Red5 http://sandeepghael.com/2009/07/getting-red-5-up-and-running-on-ubuntu-9-04/ [...]
stuart
January 19th, 2010 at 9:31 am
I can´t read grey lettering on a grey background in the name and email boxes of this form! Wierd. However, a great walkthrough that worked for me. One problem I had was my Ubuntu 9.04 to 9.10 upgrade had left java dependencies in a bit of a mess and I had to clear and reinstall. Also, the compile failed unless I was SU (´could not create directory´). About to do a restart and will see if it survives.
sghael
January 19th, 2010 at 11:46 pm
thanks for pointing out the styling issue on comment forms… fixed now. Did the Red5 process survive a restart?
Red5 Flash Streaming Server installieren » Server » Debian Root
February 5th, 2010 at 1:37 pm
[...] Installationsanleitung auf Ubuntu #2 [...]
u4david
February 5th, 2010 at 11:05 pm
It was pleasant experience even with the mix tape (http://spectrumzero.com/dj_trainwreck/djtrainwreck_story.html) playing in back ground.
This is the type of know how what makes my linux world rock.
Thank you.
Ps:
do not forget to open up ports:
http://www.dervishmoose.com/post.cfm/list-of-red-5-server-port-openings-for-firewall
Default ports:
1935,8088,5080,1936
RTMP: 1935
RTMPT: 8088
HTTP servlet engine port: 5080
Debug proxy port: 1936
u4david
February 7th, 2010 at 2:21 pm
to fix this error after reboot of the system when restarting the red5:
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:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
332)
Could not find the main class: org.red5.server.Bootstrap. Program will
exit.
To fix this go to red5.Download your versions ZIP red5 and replace your boot.jar with the one in the zipped verzion.
No need to make it executable just upload it overwrite the original with the one from the zipped folder.
Wonder what is up with that anyway (backup the original file just in case)
horse
March 9th, 2010 at 1:01 pm
It Works!!!!!
——————————————————————
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.13/
——————————————————————
i have export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.15/
——————————————————————
Redsky
April 5th, 2010 at 6:02 pm
I still have problem with running it. I am using Ubuntu Server 9.10 32-bit. When I run it with: /usr/share/red5/red5.sh
It gives me the error “u4david” posted about:
redsky@abserver:~$ /usr/share/red5/red5.sh
Running on Linux
Starting Red5
Exception in thread “main” java.lang.NoClassDefFoundError: org/red5/sertrap
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.
I followed tutorial on this site, then tried to replace my boot.jar with boot.jar from newest release from: http://code.google.com/p/red5/
But I don’t know what version is installed on my server so I don’t know which boot.jar file should I use.
If someone knows the solution to my problem, please help me
Best regards
Redsky
April 6th, 2010 at 10:34 pm
Hi again,
It looks like I have solved my problem.
In this point of tutorial:
svn co http://red5.googlecode.com/svn/java/server/trunk red5
I used url of stable version of red5 instead of the newest:
svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1 red5
When I run: /usr/share/red5/red5.sh
It says something about installer creation complete and I use Ctrl+C to get back to command line.
Then I am checking ports with: netstat -ant
and ports 1935 and 5080 have “LISTEN” on the right.
Next I am trying to connect to port 5080 with telnet: telnet localhost 5080
Everything is ok.
But here comes another problem.
When I am going in my browser to http://my-ip:5080/ it can’t connect at all.
It works ok without :5080 so http://my-ip/
I am using router so I guess I have to forward some ports for RED5 to work properly.
So I forwarded 4 ports to local ip of my server:
RTMP: 1935
RTMPT: 8088
HTTP servlet engine port: 5080
Debug proxy port: 1936
And I still can’t connect with http://my-ip:5080/
Help
Redsky
April 7th, 2010 at 10:10 pm
Yay it works!
It was firewall. I disabled Shorewall firewall and everything is up and running.
Good luck guys
Baduy
April 28th, 2010 at 7:47 pm
How to running php from red5 server and how to make red5 server executable so we do need to starting manually, anyone can help?
thanks for advance
Brian Wallace
May 8th, 2010 at 4:35 am
add this to your crontab Mate… ( works like a charm )
@reboot cd /usr/local/red5/ ; ./red5.sh & >/dev/null 2>&1
Just replace the cd /path/to/your/path
Thanks, Webmaster at LinuxTuts ( http://www.linuxtuts.net )
Problem installing red5 media server
May 24th, 2010 at 3:05 pm
[...] with java. I am running Ubuntu 10.04 and have been using this tutorial from an older Ubuntu version Getting RED 5 up and running on Ubuntu 9.04 | Sandeep Ghael When I get to this command /usr/share/red5/red5.sh & I get this error: Starting Red5 [...]
chief
May 25th, 2010 at 7:46 pm
I am using Ubuntu 10.04 and cannot get it to work. I believe all I have installed all of the necessary necessary files.
I used this: svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1 red5
and
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.20
but I am stilling getting 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.
I also tried replaced boot.jar file with the one in the 0.9.1 zip file but still this same error came up.
chief
May 26th, 2010 at 6:55 pm
I got it working.
Install(the easy way) on Ubuntu 10.04:
1)Install all the libraries listed above. updatedb is deprecated, but that is fine.
2)Download the current .tar file
3)Extract into a directory.(I used my home directory)
4) cd red5directory
5) sh red5.sh
6) localhost:5080
Tapas Mishra
June 14th, 2010 at 5:17 am
I noticed if I run it /usr/share/red5/red5.sh then it wont run.
But if you do a cd /usr/share/red5/ and then ./red5.sh then it will start.
Francesco R.
June 16th, 2010 at 3:07 pm
Great!
THANK YOU so much!!!