RNUG Lotus User Group (www.vlaad.lv)

    Domino autostart on Linux

    Vladislavs Tatarincevs  27 March 2009 16:09:10
    This is a known script, but many people new to Lotus Domino on Linux are asking about it so, I decided to post it.
    How to automatically start Domino when starting the Linux OS
    http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21173499


    in addition to this, consider another technote about
    Domino for Linux on x86 configuration
    http://www-01.ibm.com/support/docview.wss?uid=swg21377724

    ========
    2. Domino is automatically started through /etc/init.d

    Starting a Domino server automatically when Linux is booted is typically accomplished by executing a script which resides in the /etc/init.d directory (in a "runlevel") . It is worth noting, however, that /etc/security/limits.conf settings are NOT respected when Domino is automatically started by a /etc/init.d script. Therefore, a line such as the following MUST appear in the "start" section of such a script:
    ulimit -n 20000
    ========


    How to automatically start Domino when starting the Linux OS

     Technote (FAQ)
     

    Question
    How do you automatically start a Lotus® Domino® server when starting the Linux® operating system?
     
    Answer
    To do this, follow these steps:
    1. Copy the script below to a file named /etc/init.d/domino
    #!/bin/bash
    # DOM_HOME is the variable that tells the script where the Domino Data
    resides
    DOM_HOME=/home/notesdata
    # DOM_USER is the Linux account used to run the Domino 6 server
    DOM_USER=notes
    # DOM_PROG is the location of the Domino executables
    DOM_PROG=/opt/lotus/bin
    start()
    {
    echo -n Starting domino:
    if [ -f $DOM_HOME/.jsc_lock ]; then
    rm $DOM_HOME/.jsc_lock
    fi
    /bin/su - notes -c "LD_PRELOAD=/lib/libpthread.so.0:/lib/librt.so.1;export
    LD_PRELOAD;$DOM_PROG/server -jc -c" > /dev/null 2>&1 &
    return 0
    }
    stop() {
    echo -n Stopping domino:
    /bin/su - notes -c "$DOM_PROG/server -q"
    return 0
    }
    case $1 in
    start)
    start
    ;;
    stop)
    stop
    ;;
    *)
    echo Usage: domino {start|stop}
    exit 1
    esac

    2. Give execute permission to the file by using the command:
    chmod +x domino
    3. Link the file to start and stop as linux startup service, as follows:

    from /etc/rc0.d
    ln -s /etc/init.d/domino K10domino
    from /etc/rc2.d
    ln -s /etc/init.d/domino S99domino
    from /etc/rc3.d
    ln -s /etc/init.d/domino S99domino

    3. Reboot the server to see the results.

    Note: For more details about this example of how you can start Domino automatically on Linux, refer to the Lotus Domino 6 for Linux Redbooks publication at http://www.redbooks.ibm.com
     


     




    Comments

    1Henning Heinz  27/03/2009 14:21:29  Domino autostart on Linux

    The best startup script (imho) is available from Daniel Nashed

    { Link }

    Works for me on Debian, Ubuntu, RedHat, Novell/Suse and Cent OS. Great stuff.

    2Jens Bruntt  27/03/2009 14:44:52  Go for the Daniel Nashed-script

    I agree with Henning @1 above.

    The script that Daniel Nashed is maintaining is very good. And it works across a list of different *NIX versions.

    3jack dausman  27/03/2009 15:17:46  Domino autostart on Linux

    Daniel's script is the best option, and straightforward to modify.

    4David Schaffer  27/03/2009 18:29:55  Domino autostart on Linux

    I know that different operating systems require have different strengths and weaknesses and require different approaches. I don't want to start a controversy. But it does strike me that these scripts are a big jump from clicking the "run as a service" box during Domino install on Windows.

    5Vladislav Tatarincev  27/03/2009 18:55:50  Domino autostart on Linux

    thanks for comments, it is good that if some will search startup script, will find IBM original and also Daniel's script. Thanks for commenting.


    Discussion for this entry is now closed.

    Archives