TongWeb Webserver Configuration Instructions
Version: TongWeb7.0.4.9_Enterprise_Linux
TongWeb Webserver can be used as a container for HENGSHI components. The Metadb, Engine, Redis, MinIO, and Flink components used internally by HENGSHI services need to be prepared independently, and the relevant configurations will be completed in the subsequent configuration items.
Console Configuration
Pre-deployment Preparation
Prepare the Metadb, Engine, Redis, Minio, and Flink service components, and obtain the HENGSHI deployment WAR package file resources.
Prepare the Java runtime environment
Configure the TongWeb JVM settings for HENGSHI internal component configurations
Refer to the actual service addresses to configure the following information as shown in the figure:
# Metadb connection information
-DDB_URL=jdbc:postgresql://10.10.10.x:54320/hengshi?user=hengshi&password=hengshi202020
# Syslog log database connection information
-DLOG_DB_URL=jdbc:postgresql://10.10.10.x:54320/syslog?user=syslog&password=syslog
# Engine configuration information
-DENGINE_TYPE=greenplum
-DENGINE_DB=jdbc:postgresql://10.10.10.x:15432/hengshi?user=hengshi&password=hengshi202020
# Redis configuration connection information
-DREDIS_ADDRESS=redis://10.10.10.x:6379
-DREDIS_PASSWORD=foobared
-DREDIS_DATABASE=0
# Minio service configuration
-DMINIO_ACCESS_KEY=hengshi
-DMINIO_SECRET_KEY=hengshi202020
-DOBJECT_SERVER_ENDPOINT=http://10.10.10.x:9000
# Screenshot service component
-DHENGSHI_SHOT_ROOT=/opt/hengshi/lib/hengshishot-1.1.24-linux-no-arch
-DENABLE_REFERENCE_DATASET=true
- After correctly configuring the JVM parameters, restart the TongWeb server to apply the configuration parameters.
Start Deployment
Select App Management -> Deploy App
Choose the prepared war package file, upload it to the web service, and click Start Deployment
In the deployment options, set App Prefix to /
After successful deployment, you can access the service interface via HTTP Access
After deployment, operations such as Start and Stop can be performed using the buttons in the interface
Command Line Configuration
Edit <tongweb_home>/bin/external.vmoptions
to add the following configurations:
#jvm_options
...
-DWebModuleOnly=true
-Dcfg.file.path=${TongWeb_Base}/conf/config.properties
#java_home (ensure jdk11 or above)
/usr/local/java
The content of config.properties
is as follows:
# Metadb connection information
-DDB_URL=jdbc:postgresql://10.10.10.x:54320/hengshi?user=hengshi&password=hengshi202020
# Syslog log database connection information
-DLOG_DB_URL=jdbc:postgresql://10.10.10.x:54320/syslog?user=syslog&password=syslog
# Engine configuration information
-DENGINE_TYPE=greenplum
-DENGINE_DB=jdbc:postgresql://10.10.10.x:15432/hengshi?user=hengshi&password=hengshi202020
# Redis configuration connection information
-DREDIS_ADDRESS=redis://10.10.10.x:6379
-DREDIS_PASSWORD=foobared
-DREDIS_DATABASE=0
# Minio service configuration
-DMINIO_ACCESS_KEY=hengshi
-DMINIO_SECRET_KEY=hengshi202020
-DOBJECT_SERVER_ENDPOINT=http://10.10.10.x:9000
# Screenshot service component
-DHENGSHI_SHOT_ROOT=/opt/hengshi/lib/hengshishot-1.1.24-linux-no-arch
-DENABLE_REFERENCE_DATASET=true
After correctly configuring the JVM parameters, you need to restart the TongWeb server for the changes to take effect.
Deploying Hengshi App via Commandstool
Navigate to the <tongweb_home>/bin
directory and execute:
sh commandstool.sh
Use "exit" to exit and "help" for online help.
commandstool> deploy --contextroot=/ --applocation=/path/to/hengshi-sense-xxxx.war hengshi
# --contextroot: Application prefix, e.g., http://localhost:8088/hengshi
# --applocation: Client application file, e.g., /path/to/hengshi-sense-xxxx.war
# hengshi: Name of the deployed application, e.g., hengshi
After successful deployment, the default access URL is http://localhost:8088
Please note
If you are using the Commandstool for the first time, you may need to use "change-admin-password" to modify the password.
If you encounter HTTP request methods being prohibited after deployment, check the WEB container configuration > HTTP Channel Management > tong-http-listener to ensure no methods are in the prohibited list.
Version Upgrade Rollback Instructions
The hengshi service deployed on the Tongtech Webserver uses an external metadb component service. Before upgrading, please back up the metadb database to prevent issues in case a version rollback is required.
For data backup and recovery, refer to Backup and Recovery in Standalone/Cluster Environments.