1

There are many tutorials out there but not so many for 6.4 and it seems people are having problems with running either Java 6 or 7 and Ant.

So does anyone know where to find a definitive guide?

Should Java be version 6 or 7 and can I just yum install java? Then which version of red5 should I be installing? On their site they have video tutorials that don't even reflect the sitemap of their site!

so confused..

slm
  • 369,824
cea
  • 1,543

2 Answers2

2

I installed it with no issue at all using both openjdk and Sun's JDK so you might be fine with yum install java. Still, I'm on a Debian and @slm is the resident Red Hat guy so I'd follow his advice.

Whichever Java Development Kit you choose to install, running red5 is very easy. You just need to choose the latest release from their website (1.0 at the time of writing), download the newest package and extract the files.

Just create a directory where you want to install this (for example $HOME/Setups), cd into that directory and run these commands:

wget http://red5.org/downloads/red5/1_0/red5-1.0.0.tar.gz
tar xvzf red5-1.0.0.tar.gz 
cd red5-1.0.0-build-jenkins-red5-226/
./red5.sh

If all goes well, you should see a lot of text and finally:

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

You now have a running red5 server. You can check by going to http://localhost:5080.

You can now either add the red5.sh script to your path or make a link to it in a directory already in your path. For example:

sudo ln -s ~/Setups/red5-1.0.0-build-jenkins-red5-226/red5.sh /usr/local/bin/red5

You (and all other users on the system) can now simply run red5 to start the server.

slm
  • 369,824
terdon
  • 242,166
  • These are both really great answers but I chose the one more specific for choosing the confusing array of versions. Thank you very much. – cea Dec 29 '13 at 03:21
  • I am following your instructions now so thanks - I don't know why two answers can't be right. AND it is working thanks to you both! – cea Dec 29 '13 at 08:23
  • @CharlieBunt no worries, slm's is the more complete answer, accept it! – terdon Dec 29 '13 at 11:49
1

I always go with the Oracle/Sun java and try to not use the OpenJDK version. I usually run into incompatibilities, and I end up having to install it anyway.

You can't just yum install java you have to go to Oracle's website and download Java/JDK directly from there. I'd recommend getting the latest version if you can.

The naming of Java has always been a bit of a mess, I'd suggest downloading the version from the URL above, it's the Java SE version. Make sure you select the .rpm version and also make sure you select the appropriate version for your system's architecture (32-bit or 64-bit).

             ss of download

It's pretty straightforward. Once you download it you'll need to execute the download, which should begin the installation using the contained .rpm files.

I like using this method since it allows me to manage the Oracle JDK just like any other RPM on my system, so it's easier to uninstall it and also you can then have multiple versions installed along side one another.

Running red5

As @terdon has mentioned in his answer, red5 is pretty straightforward to download and execute. I just confirmed that it works fine with the OpenJDK version of Java on my Fedora 19 system, I would expect it to work just fine on CentOS 6.x without issue as well. I also tried it with Oracle's JDK so either installation of Java should suffice here.

I'll just add the following extra bits to the directions in @terdon's answer. I'd suggest changing directories to the directory that red5 was untarred into like so:

$ cd /path/to/red5
$ ./red5.sh

After it starts up you can see what ports it's listening on using this command:

$ netstat -tapn | grep java
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::1935                 :::*                    LISTEN      9419/java           
tcp6       0      0 :::47663                :::*                    LISTEN      9419/java           
tcp6       0      0 :::9999                 :::*                    LISTEN      9419/java           
tcp6       0      0 :::5080                 :::*                    LISTEN      9419/java           

After starting the server you can confirm that it's starting by navigating to the URL http://localhost:5080. You'll see a video load on a page like this:

    ss of red5 test page

slm
  • 369,824
  • so mine says i685 which is 32 bit i think. would you place the redhat in /var/www/html ???? – cea Dec 29 '13 at 03:23
  • @CharlieBunt - yeah that sounds like its 32-bit. The red5 you mean? Probably not, this is it' own server. That directory is usually meant for httpd (Apache) the web server. You can find out a system's bitness using the methods I outlined in this Q&A: http://unix.stackexchange.com/questions/77718/32-bit-64-bit-cpu-op-mode-on-linux/77724#77724 – slm Dec 29 '13 at 03:30
  • sorry i mean the rpm - which directory to usually put that in to extract? – cea Dec 29 '13 at 04:50
  • @CharlieBunt - it doesn't matter. You can download them anywhere and then install them using rpm -ivh some.rpm or yum localinstall some.rpm. You'll need to do this using sudo or be root when you do these commands. – slm Dec 29 '13 at 05:08