1. Create configuration file

Before you run the automated_install.pl script, you need to prepare a special configuration file and specify proper values for all the required installation parameters. This information will be used by the script for the automated installation of the WebSpellChecker application on your server.

1.1. Configuration file syntax

  • Configuration file has a simple structure resembling *.ini files. 
  • Each row of the file should contain one parameter with an assigned corresponding value.
  • You are allowed to use indentation, spaces, and tabs and add blank lines.
  • You can comment some of the parameters using a hash sign “#” at the very beginning of the row with a parameter name (e.g. #activate_license = 1).

Below is an example of a simple configuration file that can be used for the automated installation of the application on a Linux-based server using NGINX web server assuming that you will be using the WProofreader SDK over HTTPS.

install_path = /opt/WSC/ 
products = 1
file_owner = 33:33
protocol = 1
languages_to_install = 1,2
service_port = 2880
domain_name = localhost
web_port = 443
virtual_dir = wscservice
#changed the web server type to NGINX
web_server_type  = 2
activate_license = 1
license_ticket_id = ***************

1.2. Configuration file parameters

The table below lists all available parameters and their possible values that you can use in the configuration file.

Some of the parameters are mandatory and must be defined. The rest of the parameters are optional. If you do not define values for the optional parameters, they will be either auto-defined by the script, or the default values will be used accordingly. 

restarting

#Parameter

Parameter type

Default valuePossible valuesDescription
1install_pathOptional/opt/WSC/
  • /opt/WSC/
  • Any other appropriate location on the server

The parameter defines the installation path for the application.

If a parameter is not specified in the config, the default value will be used.

2rewrite_old_installationOptional1
  • 0 – Do not create a backup file
  • 1 – Create a backup file (WSC.bak)
The parameter is responsible for backup file creation. If you have an existing copy of the application in the specified install_path, the script will reserve the whole folder in a WSC.bak file.
3file_owner

Mandatory

33:33
  • user:group (e.g. 33:33)

The parameter sets permissions for the application. It should define the file ownership, a user and group in the user:group format.

4productsOptional1
  • 1 – WProofreader add-on for RTEs and HTML controls (CKEditor 4/5, Froala Editor, TinyMCE, Quill, etc.)
  • 2 – WebSpellChecker API
  • 3 – SCAYT Plugin for CKEditor 4
  • 4 – Select all products

The parameter defines which product and components to install. It is not recommended to install “all products” but make your choice carefully.

Use a coma as a separator for multiple options. 

5languages_to_installOptional1,2
  • 0 – None
  • 1 - English grammar (en_AI)
  • 2 - English autocomplete
  • 3 - German grammar (de_AI)
  • 4 - Spanish grammar (es_ES)
  • 5 - Select all

Specifies what AI-based languages (language models) to install. Use a coma as a separator for multiple options. 

6install_samplesOptional1
  • 0 – Do not install demo samples and API docs.
  • 1 – Install demo samples and API docs.
The parameter defines whether the demo samples and documentation should be installed.
7protocolOptional1
  • 1 – HTTPS
  • 2 – HTTP
Defines the protocol to be used when communicating with the service.
8certificate_fileOptional
  • /cert.pem

The parameter defines the path to the SSL certificate file (*.pem). Required for SSL connection setup.

If not specified and files not replaced, a test untrusted SSL certificate will be used.

9certificate_key_fileOptional
  • /key.pem
The parameter defines the path to the private key file (*.pem). Required for SSL connection setup.
10certificate_passwordOptional
  • password if any
Some SSL certificates are password-protected. 
11service_portOptional2880
  • Any available port number in the range [1-65535]
The parameter defines the WebSpellChecker service port number. This is the port of AppServer.
12domain_nameOptionallocalhost
13web_portOptional443 
  • Any available port number in the range [1-65535] of your web server. Here are some common ports:
    • 443
    • 80

The parameter specifies the port number of web server or Java application server.

14virtual_dirOptionalwscservice
  • Any string 

15web_server_typeMandatory
  • 1 – Apache HTTP Server
  • 2 – NGINX
  • 3 – Other

The parameter specifies a type of web server which will be used for the application server running.

Automated configuration for Java application servers is no longer available.

16path_to_jvmOptional
  • Path to Java Virtual Machine (JVM)

The parameter defines the pass to Java Virtual Machine (JVM) that is mandatory for the grammar engine. During the final steps of setup, the AppServer will try to autodetect the path to JVM and add it to the settings.

However, using the parameter you can predefine which version of JVM should be used.

17activate_licenseOptional0
  • 0 – Skip the license activation step.
  • 1 – Run the license activation step.
The parameter defines whether to run the license activation process. You can skip the license activation step if you have already activated a license or you prefer to proceed with the license activation step later.
18license_ticket_idOptional
  • Your valid license ticket ID. It can be a trial (30 day) or a commercial license (1 year).
The parameter specified a License Ticket ID that will be used during the license activation procedure.
19apache_versionOptional
  • 2.2.x
  • 2.4.x
The parameter defines the current version of Apache HTTP Server. It will be auto-detected.
20web_server_config_dirOptional
  • /etc/apache2
  • /etc/apache2/conf.d
  • /etc/nginx/conf.d

The parameter defines the location of the Apache HTTP Server or NGINX configuration file (httpd.conf/wscservice.conf). It can be auto-defined by the installation script.

Initially, it was named like this: apache_config_dir. Later, with automating the installation for NGINX, it was renamed.

21

apache_auto_enable_modules

Optional

1

  • 0 – Do not enable extra modules.

  • 1 – Enable all required extra modules.

The parameter enables additional Apache HTTP Server mod_mimemod_headers, proxy, proxy_http modules.

They are required for proper work of the application.

22

restart_web_server

Optional

0

  • 0 – Do not restart web server

  • 1 – Restart web server

The parameter is responsible for restarting of a selected web server. It is required for changes to take effect.

Initially, it was named like this: restart_apache. Later, with automating the installation for NGINX, it was renamed.

23enable_proxyOptional0
  • 0 - Do not enable a proxy server.
  • 1 - Enable proxy server.

Enable proxy server connection.

24proxy_hostOptional

Proxy server host name or IP address.

25proxy_portOptional

TCP port number for proxy server.

26proxy_user_nameOptional

User name to access a proxy server.

27proxy_passwordOptional
  • password if any

User password to establish a connection with proxy server.

2. Run automated install script

As soon as a configuration file with all the required parameters is defined, you need to run the automated_install.pl script with the install_config.ini configuration file as a first parameter as follows:

$ sudo ./automated_install.pl install_config.ini

OR

$ sudo perl automated_install.pl install_config.ini

If you specified a non-existing parameter in the configuration file, the automated installation will instantly fail, and throw an error message indicating an incorrect parameter. Moreover, with an incorrect  parameter, the script may suggest possible valid parameters and their default values. However, if there is an error in a specified value, the installation will fail only on the specific step and might not give you a clear message for error handling.

3. Activate license

If you assigned “1” as a value for the activate_license parameter, the installer will attempt to activate a license automatically using a license ticket ID.

The automatic license activation mode requires the Internet connection available on the machine where you are trying to install WebSpellChecker.

Otherwise, you need to proceed with the license activation procedure according to the License activation on Linux manually.

4. Verify operability

Find the correct responses for the application version and status below.

5. Integrate WebSpellChecker