Quantcast
Channel: Visual Paradigm Know-how » system service
Viewing all articles
Browse latest Browse all 2

Setup Floating License Server as System Service on Linux

0
0

You can setup the Floating License Server as Linux system service. By setting up the server as service, it will start automatically when your machine boots up. This article will show you how to setup the floating license server as Linux system service.

  1. Setup license server beforehand. For those who want to know more about installing license server, please refer to Install floating license server article. It is supposed that the server is named as VPFloatingLicenseServer
  2. Prepare Service Script. A service script is used to be called by your OS when your computer is started. Go to /etc/init.d folder and create the service file vpflsd.

    Create Service Script

    Create Service Script

  3. The following is content of the script file, you are required to input the correct path into VPFLS_HOME (i.e.  /etc/VPFloatingLicenseServer):
    #!/bin/sh
    # Source function library.
    . /etc/rc.d/init.d/functions
    #SET THE FOLLOWING LINE TO YOUR CORRECT VPFLS_HOME
    export VPFLS_HOME=/etc/VPFloatingLicenseServer
    export TOMCAT_HOME=$VPFLS_HOME/webserver
    export JRE_HOME=$VPFLS_HOME/jre
    export PATH=$PATH:$TOMCAT_HOME/bin:$JRE_HOME/bin
    export HOME=/root/#IF YOU NEED SPECIAL CLASSES IN YOUR CLASSPATH
    #AT STARTUP, ADD THEM TO YOUR CLASSPATH HERE
    #export CLASSPATH=start() {
    cd $TOMCAT_HOME/bin
    echo -n “Starting tomcat daemon: ”
    daemon $TOMCAT_HOME/bin/startup.sh
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/tomcat
    }stop() {
    echo -n “Stopping tomcat daemon: ”
    daemon $TOMCAT_HOME/bin/shutdown.sh
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/tomcat
    sleep 4
    }RETVAL=0# See how we were called.
    case “$1″ in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    start
    ;;
    esac

    You can download the sample service script file at the bottom of the page.

  4. Grant execute permission to service script. You can execute the command chmod +X vpflsdto grant execute permission to the script file.

    Grant execute permission to service script.

    Grant execute permission to service script.

  5. Create Symbolic Link into runlevel folder (rcX.d). Once you ready the service script, you can then define symbolic link in runlevel folder for launching the script. You first have to check what is your run level by reading the file /etc/init/rc-sysinit.conf. From the rc-sysinit.conf we know that our default runlevel is 2, that means the runlevel folder is rc2.d.
    *Note that different Linux may use different comment to lookup the default run level.
    Check default run level.

    Check default run level.Default run level of the system.

    Default run level of the system.

    Default run level of the system.

  6. Go to /etc/rc2.d, and there are a list of files, and their names are starts with Sxx (where xx is a number, the smaller number, higher priority on being called). You need to create a Sxx symbolic link to start and stop license server. i.e.  execute the command to create the symbolic links: ln -s ../init.d/vpflsd S99vpflsd

    Create symbolic link.

    Create symbolic link.

  7. Now, Floating License Server will be started or stopped when your computer is started/shutdown.

Download sample service script

Download sample service script

Details about setup floating license server as system service on Mac can be found here.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images