All_about_network

Installation of red5 and java 6 se nad jre on debian

by tnk on Jul.23, 2008, under Computers, Linux, Software

debian logoSo, because I was doing real work lately there was no time for some new post. Anyway there is something that I experienced and was not so easy as I originally thought.
As you can guess I tried to install red5 on debian etch alltogether with java 6. It seemed as an easy task but it was not… So here is the few steps guide you need to get it done:

    1. Step One – get java
      Step Two – get the red5 debian package
      Third and last step is starting your red5 and setting it to start automatically after reboot
  • - this seemed easy, but unfortunately in etch/stable there is not a package for java6 so what you need is to follow this tutorial about adding “backports” to your sources.list for aptitude. Just in case this link will die there is what is says:

    1. Add this line to /etc/apt/sources.list
    deb http://www.backports.org/debian etch-backports main contrib non-free
    2. Run apt-get update
    3. All backports are deactivated by default. If you want to install something from backports run:
    apt-get -t etch-backports install “package”

    In my case it was something like sun-java6-bin.
    When the install ends you can confirm the version by command

    java -version

    and the output should be something like this:

    java version “1.6.0_06″
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)

    This is easy but not without problems – just go to osflash.org/red5 web page and download the pre-compiled .deb package. In my case it was latest 0.70 stable.
    The problem is that this package is also precompiled with dependency to java 5 (i.e. java 1.5.x) so you have a problem. You can install it ignoring the dependency.
    But this will result without dependencies and without configuration which will drive your apt crazy.
    So better way you is doing it the properly. For that you have to unpack the .deb package and change the dependency to java6. It is done using the following commands:

    dpkg-deb -x red5.deb tmpdir
    dpkg-deb –control red5.deb tmpdir/DEBIAN
    vi tmpdir/DEBIAN/control (here just change the line including java-1.5-bin to 1.6)
    dpkg -b tmpdir red5-hacked.deb

    This will prepare your .deb package. After this just run

    dpkg -i red5-hacked.deb

    All dependencies will be met so no problems should occur any more.

    The firs part is easy just run:

    /etc/init.d/red5 start

    and verify by

    ps -aux | grep red

    which should show two lines – first the java running the red5 and second showing your command
    The other part is also easy – the script in /etc/init.d is done automatically by red5 package. The only thing you probably want to change is to run this service under some other user.

And that’s all folks. Your red5 is up and running.

:, , ,

3 Comments for this entry

  • Gera

    Impressa:) or as a Portuguese, vpechatlilso!

  • Bittersweet

    I would like to see the inscription “to be continied”:-D

    • tnk

      Hi to be honest it will be continued as the new debian lenny is out as stable and new version of red5 is about to be out of RC stage. There is an neccessary upgrade pending but I cannot promise when it will happen and when I will write about it as I am quite busy at the moment.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!