WebSpellChecker.net Wiki

Automated installation of the WebSpellChecker.net application

This feature is available in the WebSpellChecker.net application version and higher.

General info

In order to run automated installation you need to supply a config file with answers to questions of the installer. You can call the installer (automated_install.pl) with the config file as the first parameter in console/terminal, e.g. :

$ sudo ./automated_install.pl install.conf


$ sudo perl automated_install.pl config

Note! Extension and name of the configuration file to be passed as argument to the installer can be any.

Config file syntax

The file has a simple structure resembling .ini files, but lacking sections. Each row of the file contains one parameter and its value delimited by an assignment:

        install_path = opt/WSC/ 
	file_owner = 33:33
	service_host = https://your_host/spellcheck
	web_server_type  = 1
        apache_install_mod_fastcgi = 1
	apache_auto_enable_modules = 1
	#foo = bar

You are allowed to use indentation or any number of spaces and tabs before, after or somewhere in the middle, add blank lines. You can also temporarily comment some of the parameters with a # as the first character of the parameter name.

All allowed parameters

Each parameter in the config file provides an answer (or a choice) for some of the installer's questions. You don't have to specify every parameter available because many of them have default values.

Here is a list of all possible parameters:

  • install_path
  • rewrite_old_installation
  • file_owner
  • service_host
  • web_server_type
  • apache_version
  • apache_config_dir
  • apache_install_mod_fastcgi
  • apache_auto_enable_modules
  • run_license_request
  • restart_apache

Mandatory parameters

  • web_server_type - cannot be auto-filled, so you HAVE TO SPECIFY it explicitly.

The possible values are:

1 (Apache)
2 (Java Application Server)
3 (Other)
  • file_owner - should be specified in the form of x:y, where x and y are groups and users, either number or string.

file_owner and service_host can be auto-filled from the previous backup (WSC.bak), but if there is no backup, these parameters won't have default values and installation process will fail if you don't provide these parameters.

Default values

Some of the parameters have default values:

	rewrite_old_installation = 1
	run_license_request = 0
	restart_apache = 0
        apache_install_mod_fastcgi = 0

Parameters above are optional and if you omit some of them it will use the default value. All three parameters are boolean, so only 0 or 1 is allowed. Anything else will be treated in a boolean context (i.e. 0 is false and anything else is true).

Apache specific parameters

There are three parameters related to Apache web server:

  • apache_version
  • apache_config_dir
  • apache_auto_enable_modules (this paramater is available only for Debian operating systems)

These parameters are auto-detected too. They are used only if you choose Apache as your web server with web_server_type parameter. If you choose Apache and don't provide these two parameters, then the auto-detected values will be used. If no Apache parameters can be auto-detected, then installation will fail.

  • apache_version should contain a version number, e.g. 2.4.7
  • apache_config_dir is a path to a directory, e.g. /etc/apache2/conf-available
  • apache_auto_enable_modules it is modules which are required for the WebSpellChecker application, should contain boolean value, e.g. '1' or '0'
  • apache_install_mod_fastcgi signalizes if our custom generic mod_fastcgi should be installed by our installer.

Error handling

If you specify a non-existent parameter in the config file, the installation will fail instantly with a message describing possible parameters and their default values, which will display your incorrect parameter name.

But if you provide a wrong value for some existing parameter the installation will fail only when the corresponding step runs. The error description will differ depending on the step.