Standalone Environment Version Upgrade
In a standalone environment, the version upgrade process generally follows the flow of stopping the old version service -> installing the new version -> updating dependencies -> starting the new version service. Detailed upgrade steps are as follows.
Obtain the new version installation package and extract it to the installation device.
Stop the old version service.
Switch to the runtime user and execute the stop service command in the installation directory. Refer to the example below, where the runtime username ishengshi
and the old version installation path is/opt/hengshi
.
sudo su - hengshi # Switch to the product runtime user
cd /opt/hengshi # Enter the installation target directory
bin/hengshi-sense-bin stop all # Stop the old version service
- Install the new version. Execute the new version installation command in the extracted package directory. Refer to the example below for operation.
sudo su - hengshi # Switch to the product runtime user
cd ~/pkgs/hengshi-sense-[version] # Switch to the extracted target directory
# Install the new version. The script will automatically back up the data from the previous version. If you do not want to back up, add the parameter -s t.
./hs_install -p /opt/hengshi
The following message indicates that the new version has been successfully installed:
SUCCESSED! installed to xxxxx
Note
If you are not using HENGSHI's metadb, ensure that the variable export HS_PG_IF_EXTERNAL=false
is set to true. You can modify this in the configuration file conf/hengshi-sense-env.sh
. During the upgrade process, stopping this service will not be required.
- Update system dependencies. This operation requires the user to have sudo permissions during execution. After successful execution, sudo permissions can be revoked. Refer to the example below for operation.
sudo su - hengshi # Switch to the product runtime user
cd /opt/hengshi # Enter the installation target directory
bin/hengshi-sense-bin init-os all # Initialize OS
Note
For offline environments, use bin/hengshi-sense-bin init-os all-offline
to skip online dependency updates.
- Start the new version service. Execute the new version start command in the installation directory.
sudo su - hengshi # Switch to the product runtime user
cd /opt/hengshi # Enter the installation target directory
bin/hengshi-sense-bin start all # Start the new version service
When the service starts successfully, the following message will be displayed, and the module status will be IS ACTIVE:
IS ACTIVE! : [metadb] @127.0.0.1:5301/hengshi
IS ACTIVE! : [engine] @localhost:5302/hengshi
IS ACTIVE! : [minio] minio server /opt/hengshi/minio-data
IS ACTIVE! : [redis] 127.0.0.1@5307
IS ACTIVE! : [syslog] syslog-ng --no-caps --module-path=/opt/hengshi/lib/syslog-ng/lib/syslog-ng -f /opt/hengshi/conf/syslog-ng.conf -p /opt/hengshi/logs/syslog-ng.pid -R /opt/hengshi/logs/syslog-ng.persist -c /opt/hengshi/logs/syslog-ng.ctl
IS ACTIVE! : [apmserver] /opt/hengshi/lib/apm-server/apm-server -c /opt/hengshi/conf/apm-server.yaml
IS ACTIVE! : [hengshi] jar /opt/hengshi/lib/bootstrap-6.0.0.jar
IS ACTIVE! : [monit] /opt/hengshi/lib/monit/bin/monit -c /opt/hengshi/conf/monitrc
- Upgrade complete. Access the service address via a browser to use the HENGSHI SENSE service.