RE: java on RH AS 3.0?

From: Ryan Golhar (golharam_at_umdnj.edu)
Date: 09/08/04

  • Next message: Reuben D. Budiardja: "Re: java on RH AS 3.0?"
    To: "'Reuben D. Budiardja'" <techlist@voyager.phys.utk.edu>, "'General Red Hat Linux discussion list'" <redhat-list@redhat.com>
    Date: Wed, 8 Sep 2004 13:45:55 -0400
    
    

    Hi Reuben,

    I had the exact same question. Here is a message from the archives that
    answered my question. But you still make a good point, the replacement
    /usr/bin/java shell script is pointless.

    the alternatives system is there to allow you to install several
    services/packages that provide the same functionailty ( and very often
    the
    same program names) and switch between them without uninstalling either.
    Its most common use is to switch between sendmail and postfix, but links
    can
    be set up to cater for any package at all.
    How does it work?
    okay, the postfix/sendmail example:
    many programs look for a 'sendmail' binary when they want to, well, send
    mail. unfortunately both the sendmail and postfix packages normally
    provide a
    binary of this name, which means that if you want to switch from
    sendmail to
    postfix you would normally have to uninstall sendmail and then install

    postfix instead, which will involve at the very least a certain amount
    of
    downtime. On a Redhat system, these packages have been 'hacked' to
    provide
    sendmail.sendmail / sendmail.postfix (among other) binaries, so that
    this
    problem no longer exists, but how do apps know which one to call? a
    series of symbolic links are set up: /usr/sbin/sendmail ->
    /etc/alternatives/mta -> /usr/sbin/sendmail.postfix why three links
    instead of two? well, the other programs with clashing names also have
    to be dealt with, This
    is done using a series of 'slave' links which are automtically switched
    over
    when you change the master 'mta' link.
    try the alternatives command:
    [root@behemoth root]# alternatives --display mta
    mta - status is manual.
     link currently points to /usr/sbin/sendmail.postfix
    /usr/sbin/sendmail.sendmail - priority 90 slave mta-pam:
    /etc/pam.d/smtp.sendmail slave mta-mailq: /usr/bin/mailq.sendmail slave
    mta-newaliases: /usr/bin/newaliases.sendmail slave mta-rmail:
    /usr/bin/rmail.sendmail slave mta-rsmtp: (null) slave mta-runq:
    (null)
    slave mta-sendmail: /usr/lib/sendmail.sendmail slave mta-mailqman:
    /usr/share/man/man1/mailq.sendmail.1.gz
     slave mta-newaliasesman: /usr/share/man/man1/newaliases.sendmail.1.gz
     slave mta-aliasesman: /usr/share/man/man5/aliases.sendmail.5.gz
     slave mta-sendmailman: /usr/share/man/man8/sendmail.sendmail.8.gz
    /usr/sbin/sendmail.postfix - priority 30
     slave mta-pam: /etc/pam.d/smtp.postfix
     slave mta-mailq: /usr/bin/mailq.postfix
     slave mta-newaliases: /usr/bin/newaliases.postfix
     slave mta-rmail: /usr/bin/rmail.postfix
     slave mta-rsmtp: (null)
     slave mta-runq: (null)
     slave mta-sendmail: (null)
     slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
     slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
     slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
     slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
    Current `best' version is /usr/sbin/sendmail.sendmail.

    you switch between the two systems with
    alternatives --set mta /usr/sbin/sendmail.sendmail
    (or postfix or any other that you have set up this way)
    or by using
    redhat-switch-mail
    wich will change the master link and the slaves will follow along like
    sheep.

    any help?
    ps if you want to know the command that set these things up, look at the

    install scripts for sendmail

    rpm -qp --scripts sendmail

    -----
    Ryan Golhar
    Computational Biologist
    The Informatics Institute at
    The University of Medicine & Dentistry of NJ

    Phone: 973-972-5034
    Fax: 973-972-7412
    Email: golharam@umdnj.edu

    -----Original Message-----
    From: Reuben D. Budiardja [mailto:techlist@voyager.phys.utk.edu]
    Sent: Wednesday, September 08, 2004 12:55 PM
    To: golharam@umdnj.edu; General Red Hat Linux discussion list
    Subject: Re: java on RH AS 3.0?

    On Wednesday 08 September 2004 11:02, Ryan Golhar wrote:
    > How do you uninstall the libgcj package? I tried doing that initially

    > but found libgcj is required by other RPMs which in turn are required
    > by others as well...

    And I still don't understand what the heck is the link /usr/bin/java,
    /usr/bin/javac provided by the libgcj supposed to do. I mean, I read
    about
    the /etc/alternatives stuffs and what it supposes to do, but in all
    practicality, the command java and javac from Redhat do nothing. How is
    it
    suppose to work? could someone explain ?

    (BTW, I also just removed the symlink so my PATH would pick up my own
    Sun's
    JDK install).

    Thanks.

    RDB

    -- 
    Reuben D. Budiardja
    Dept. Physics and Astronomy
    University of Tennesse, Knoxville, TN
    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.12
    GIT/M/MU/P/S d-(++) s: a-- C++(+++) UL++++ P-- L+++>++++ E- W+++ 
    N+ o? K- w--- !O M- V? !PS !PE Y PGP- t+ 5 X R- tv+
    b++>+++ DI D(+) G e++>++++ h+(*) r++ y->++++
    ------END GEEK CODE BLOCK------
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Reuben D. Budiardja: "Re: java on RH AS 3.0?"

    Relevant Pages

    • Re: /etc/alternatives
      ... Its most common use is to switch between sendmail and postfix, ... many programs look for a 'sendmail' binary when they want to, well, send mail. ... postfix you would normally have to uninstall sendmail and then install ... is done using a series of 'slave' links which are automtically switched over ...
      (RedHat)
    • Using redhat-switch-mail-nox in a script?
      ... I want to switch from sendmail to postfix on RHEL-3, ... find any command-line switches for redhat-switch-mail-nox ...
      (RedHat)
    • Re: How to replace sendmail with postfix?
      ... Currently I am using sendmail with authentication, ... Many people move to postfix because they had ... I personally have a more simple reason. ... I don't see a point why should switch. ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Using redhat-switch-mail-nox in a script?
      ... > Does anybody know how to switch from sendmail to postfix with a simple ... Pete's right - the alternatives command i what you want. ...
      (RedHat)
    • Re: Weird sendmail alias setting, perhaps a hack?
      ... >>switch to a more manageable MTA. ... I managed Sendmail for several years. ... the same config file had ... we were already running Postfix on the first of the new ...
      (comp.os.linux.misc)