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 certificate_file = /opt/WSC/cert/cert.pem certificate_key_file = /opt/WSC/cert/key.pem certificate_password = *************** 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.
# | Parameter | Parameter type | Default value | Possible values | Description |
---|---|---|---|---|---|
1 | install_path | Optional | /opt/WSC/ |
| The parameter defines the installation path for the application. If a parameter is not specified in the config, the default value will be used. |
2 | rewrite_old_installation | Optional | 1 |
| 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. |
3 | file_owner | Mandatory | 33:33 |
| The parameter sets permissions for the application. It should define the file ownership, a user and group in the user:group format. |
4 | products | Optional | 1 |
| 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. |
5 | languages_to_install | Optional | 1,2 |
| Specifies what languages to install. Use coma as a separator for multiple options. NEW | 5.8.1 |
6 | install_samples | Optional | 1 |
| The parameter defines whether the demo samples and documentation should be installed. |
7 | protocol | Mandatory | 1 |
| |
8 | certificate_file | Mandatory |
| The parameter defines the path to the SSL certificate file (*.pem). Required for SSL connection setup. | |
9 | certificate_key_file | Mandatory |
| The parameter defines the path to the private key file (*.pem). Required for SSL connection setup. | |
10 | certificate_password | Optional |
| Some SSL certificates are password-protected. | |
11 | service_port | Mandatory | 2880 |
| The parameter defines the WebSpellChecker service port number. This is the port of AppServer. |
12 | domain_name | Mandatory | localhost |
| |
13 | web_port | Mandatory | 443 or 8443 |
| The parameter specifies the port number of web server or Java application server. |
14 | virtual_dir | Mandatory | wscservice |
| |
15 | web_server_type | Mandatory | 1 |
| The parameter specifies a type of web or application server which will be used for the application server running. |
16 | path_to_jvm | Optional |
| 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. | |
17 | activate_license | Optional | 1 |
| 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. |
18 | license_ticket_id | Optional |
| The parameter specified a License Ticket ID that will be used during the license activation procedure. | |
19 | apache_version | Optional | Current Apache HTTP Server version installed |
| The parameter defines the current version of Apache HTTP Server. |
20 | apache_config_dir | Optional | Current Apache HTTP Server configuration directory |
| The parameter defines location of the Apache HTTP Server configuration file (httpd.conf). It can be auto-defined by the installation script. |
21 | apache_install_mod_fastcgi | Optional | 0 |
| The parameter installs a generic mod_fastcgi module which is shipped with the installation package. The mod_fastcgi module is required for the proper work of the application. It is recommended to use a certain external mod_fastcgi module which is specifically tailored for your system. However, you may decide to stick with a generic one shipped with the package. This parameter is needed when installing the WSC Dialog plugin for CKEditor 4. |
22 | apache_auto_enable_modules | Optional | 1 |
| The parameter enables additional Apache HTTP Server mod_mime and mod_headers modules. They are required for a proper work of the application. |
23 | restart_apache | Optional | 0 |
| The parameter is responsible for restart of Apache HTTP Server. It is required for changes to take effect. |
24 | enable_floating_licensing | Optional | 0 |
| NEW | 5.5.9 DEPRECATED | 5.15.0 Enable the floating licensing mechanism. |
25 | floating_license_server | Optional | Host name/IP address of a license server and its port, e.g. 127.0.0.1:2881 | NEW | 5.5.9 DEPRECATED | 5.15.0 A host name/IP address and port number of a license server. | |
26 | enable_license_ssl | Optional | 0 |
| NEW | 5.5.9 DEPRECATED | 5.15.0 Enable SSL connection between a license server and a client node of WebSpellChecker. |
27 | enable_proxy | Optional | 0 |
| NEW | 5.10.0.3 Enable proxy server connection. |
28 | proxy_host | Optional | NEW | 5.10.0.3 Proxy server host name or IP address. | ||
29 | proxy_port | Optional | NEW | 5.10.0.3 TCP port number for proxy server. | ||
30 | proxy_user_name | Optional | NEW | 5.10.0.3 User name to access proxy server. | ||
31 | proxy_password | Optional |
| NEW | 5.10.0.3 User password to establish 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
Troubleshooting
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
Now you are ready to check if the installation process of the application went well, and all the components are functioning properly. Check the application version, status, and access to the demo samples to verify if the application works properly after the installation. Do not use 2880 port when accessing samples or other statics files like wscbundle.js file as such files will be processed by a selected web server or Java application server. 2880 is a port that WSC AppServer listens to and which is designed to process service requests (check spelling, grammar and others).
Find the correct responses for the application version and status below.
Here is a correct status response of WebSpellChecker Server:WebSpellChecker Server Status
{
"SpellCheckEngine": {
"active": true
},
"GrammarCheckEngine": {
"active": true,
},
"EnglishAIModel": {
"active": true
},
"GermanAIModel": {
"active": true
},
"SpanishAIModel": {
"active": true,
},
"EnglishAutocomplete": {
"active": true,
}
}
Here is a correct version response for WebSpellChecker Server 5.x.x.x on a Linux server:WebSpellChecker Server Version
{
"Copyright": "(c) 2000-2023 WebSpellChecker LLC",
"ProductWebsite": "webspellchecker.com",
"ProgramVersion": "5.x.x.x x64 master:xxxxxxxx (xxxx) #xx",
"PackageVersion": "5.x.x.x master:xxxxxxx (xxx) #xx"
}
Here is the correct view of the WebSpellChecker demo samples:WebSpellChecker Demo Samples
5. Integrate WebSpellChecker
Integrate WebSpellChecker products into your web application. Do not use 2880 port when accessing samples or other statics files like wscbundle.js file as such files will be processed by a selected web server or Java application server. 2880 is an internal port that WSC AppServer listens to and which is designed to process service requests (check spelling, grammar and others). Visit Products and integrations guides to learn more how to get started with WebSpellChecker products, one of them being WProofreader. Depending on the type of elements, namely HTML native elements or rich text editors where the spelling and grammar check is needed, you may choose and use the demo samples that are shipped with the package. To access the default samples, go to http(s)://your_host_name:port/wscservice/samples/ where port is the port of your web server or Java application server. The default samples contains all the necessary samples and instructions that will help with the integration of the WebSpellChecker products. Moreover, each sample contains detailed development documentation with a list of methods and parameters available.Option A. Integration Guides
Option B. Demo Samples