Differences between revisions 1 and 2
Revision 1 as of 2009-11-17 08:16:58
Size: 2916
Editor: KaareChristiansen
Comment: Generated the documentation branch for 3.12
Revision 2 as of 2010-04-20 10:05:32
Size: 2951
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Appendix B : Starting automatically = = Appendix B : Starting Netarchivesuite automatically =
Line 6: Line 6:
Currently, when a computer is rebooted, the applications has to be started manually.
This descripes how to make the operating systems start the applications during startup.
Currently, when a computer is rebooted, the applications has to be started manually. This descripes how to make the operating systems start the applications during startup.
Line 10: Line 9:

Log in as administrator.
Create following script in '/etc/init.d/' (the name of the script will be refered to as ~+{{{netarkiv}}}+~):
Log in as administrator. Create following script in '/etc/init.d/' (the name of the script will be refered to as ~+{{{netarkiv}}}+~):
Line 18: Line 15:
Line 22: Line 18:
 su - netarkiv -c 'ENV_NAME/conf/startall.sh'
 ;;
        su - netarkiv -c 'ENV_NAME/conf/startall.sh'
        ;;
Line 25: Line 21:
 su - netarkiv -c 'ENV_NAME/conf/killall.sh'
 ;;
        su - netarkiv -c 'ENV_NAME/conf/killall.sh'
        ;;
Line 28: Line 24:
 echo "Usage: $0 { start | stop }"
 exit 1
        echo "Usage: $0 { start | stop }"
        exit 1
Line 32: Line 28:
Line 36: Line 31:
Line 39: Line 35:
The script can also be run manually, by the commands:
Line 40: Line 37:
The script can also be run manually, by the commands:
Line 45: Line 41:

Line 48: Line 42:

This is an example of how to make Windows 2003 Server automatically call a script during start-up.
The restart script has to be run, since it might not have closed correctly last time (e.g. power-failure, spontanious reboot, etc.).
This cleans up before the applications are restarted.
This is an example of how to make Windows 2003 Server automatically call a script during start-up. The restart script has to be run, since it might not have closed correctly last time (e.g. power-failure, spontanious reboot, etc.). This cleans up before the applications are restarted.
Line 54: Line 45:
  * Install Microsoft Resource Kit Windows 2003 Server.
  * Run the program ~+{{{RkTools.exe}}}+~, and install with standard settings.
  * Open a Command Prompt, and go the to directory where the Resource Kit has been installed (e.g. ~+{{{C:\Program Files\Windows Resource Kits\Tools}}}+~).
  * Install a service with the following command ~+{{{Instsrv <ServiceName> <path to resource kit>\srvany.exe}}}+~ (e.g. ~+{{{Instsrv BitApp "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"}}}+~).
  * Open the registration database wit ~+{{{regedit}}}+~, and find the service through the path ~+{{{HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<SercviceName>}}}+~.
  * Make sure that the start value is 2 (starting automatically).
  * Create a new 'Key' called ~+{{{Parameters}}}+~.
  * In this 'Key' create a new 'String Value' called ~+{{{Application}}}+~, which contains the complete path to the bat-script (e.g. ~+{{{c:\users\USERNAME\ENV_NAME\conf\restart.bat}}}+~).
  * Also within the 'Key' create another 'String Value' called ~+{{{AppDirectory}}}+~, which should contain a path to the directory where the bat-script is placed (e.g. ~+{{{c:\users\USERNAME\ENV_NAME\conf}}}+~).
Line 64: Line 46:
 * Install Microsoft Resource Kit Windows 2003 Server.
 * Run the program ~+{{{RkTools.exe}}}+~, and install with standard settings.
 * Open a Command Prompt, and go the to directory where the Resource Kit has been installed (e.g. ~+{{{C:\Program Files\Windows Resource Kits\Tools}}}+~).
 * Install a service with the following command ~+{{{Instsrv <ServiceName> <path to resource kit>\srvany.exe}}}+~ (e.g. ~+{{{Instsrv BitApp "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"}}}+~).
 * Open the registration database wit ~+{{{regedit}}}+~, and find the service through the path ~+{{{HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<SercviceName>}}}+~.
 * Make sure that the start value is 2 (starting automatically).
 * Create a new 'Key' called ~+{{{Parameters}}}+~.
 * In this 'Key' create a new 'String Value' called ~+{{{Application}}}+~, which contains the complete path to the bat-script (e.g. ~+{{{c:\users\USERNAME\ENV_NAME\conf\restart.bat}}}+~).
 * Also within the 'Key' create another 'String Value' called ~+{{{AppDirectory}}}+~, which should contain a path to the directory where the bat-script is placed (e.g. ~+{{{c:\users\USERNAME\ENV_NAME\conf}}}+~).

Appendix B : Starting Netarchivesuite automatically

Action(edit)

This manual contains the description about how to make the applications start automatically when the operating system is starting.

Currently, when a computer is rebooted, the applications has to be started manually. This descripes how to make the operating systems start the applications during startup.

Linux

Log in as administrator. Create following script in '/etc/init.d/' (the name of the script will be refered to as netarkiv):

# chkconfig: 345 80 20
# description: netarkiv
[ -x /home/USERNAME/ENV_NAME/conf/startall.sh ]  || exit 0
case $1 in
    start)
        su - netarkiv -c 'ENV_NAME/conf/startall.sh'
        ;;
    stop)
        su - netarkiv -c 'ENV_NAME/conf/killall.sh'
        ;;
    *)
        echo "Usage: $0 { start | stop }"
        exit 1
esac

Where USERNAME is the name of the user for the installation, and ENV_NAME is the environment name for NetarchiveSuite (defined in the configuration file).

The following command has to be run for the netarkiv script to be run during start-up and shut-down of Linux:

chkconfig --add netarkiv

The script can also be run manually, by the commands:

service netarkiv stop
service netarkiv start

Windows

This is an example of how to make Windows 2003 Server automatically call a script during start-up. The restart script has to be run, since it might not have closed correctly last time (e.g. power-failure, spontanious reboot, etc.). This cleans up before the applications are restarted.

Create the service.

  • Install Microsoft Resource Kit Windows 2003 Server.
  • Run the program RkTools.exe, and install with standard settings.

  • Open a Command Prompt, and go the to directory where the Resource Kit has been installed (e.g. C:\Program Files\Windows Resource Kits\Tools).

  • Install a service with the following command Instsrv <ServiceName> <path to resource kit>\srvany.exe (e.g. Instsrv BitApp "C:\Program Files\Windows Resource Kits\Tools\srvany.exe").

  • Open the registration database wit regedit, and find the service through the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<SercviceName>.

  • Make sure that the start value is 2 (starting automatically).
  • Create a new 'Key' called Parameters.

  • In this 'Key' create a new 'String Value' called Application, which contains the complete path to the bat-script (e.g. c:\users\USERNAME\ENV_NAME\conf\restart.bat).

  • Also within the 'Key' create another 'String Value' called AppDirectory, which should contain a path to the directory where the bat-script is placed (e.g. c:\users\USERNAME\ENV_NAME\conf).

Now the application should automatically start during Windows startup.

Installation Manual 3.12/AppendixB (last edited 2010-08-16 10:24:49 by localhost)