Standalone Environment Version Upgrade
In a standalone environment, the version upgrade is generally carried out according to the process of stopping the old version service -> installing the new version -> updating dependencies -> starting the new version service. The detailed upgrade steps are as follows.
Obtain the new version installation package and extract it to the installation device.
Stop the old version service. Enter the running user, and in the installation directory, execute the stop service command. Refer to the example below, where the executing username is hengshi, and the old version installation path is /opt/hengshi.
sudo su - hengshi # Switch to the product running user
cd /opt/hengshi # Enter the installation target directory
bin/hengshi-sense-bin stop all # Stop the old version services
- Install the new version. In the installation package extraction directory, execute the new version installation command. Please refer to the example below for the operation.
sudo su - hengshi # Switch to the product running user
cd ~/pkgs/hengshi-sense-[version] # Switch to the target directory for extraction
./hs_install -p /opt/hengshi # Install the new version, the script will automatically back up the data from the previous version, if you do not want to back up, please add the parameter -s t
The following message indicates that the new version has been successfully installed.
SUCCESSED! installed to xxxxx
Tip
If the metadb used is not HENGSHI SENSE's, ensure that the value of the export HS_PG_IF_EXTERNAL=false
variable is true. This can be changed in the configuration file conf/hengshi-sense-env.sh. The service will not be required to stop during the upgrade process.
- Update system dependencies. This operation requires the user to have sudo privileges during execution, and the sudo privileges can be turned off after successful execution. Please refer to the example for the operation.
sudo su - hengshi # Switch to the product running user
cd /opt/hengshi # Enter the installation target directory
bin/hengshi-sense-bin init-os all # Initialize os
- Start the new version service. In the installation directory, execute the new version startup command.
sudo su - hengshi # Switch to the product running 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 is displayed, and the module status is IS ACTIVE.
hengshi 415040 1 0 Sep01 ? 00:00:24 /opt/hengshi/lib/pgsql/bin/postgres -D /opt/hengshi/pg_data
IN ACTIVE! [metadb] /opt/hengshi/lib/pgsql/bin/postgres -D /opt/hengshi/pg_data
hengshi 415616 1 0 Sep01 ? 00:00:00 /opt/hengshi/lib/gpdb-5.3.0.7-centos7-cluster/gpdb/bin/postgres -D /opt/hengshi/engine-cluster/data/SegDataDir-1 -p 15432 --gp_dbid=1 --gp_num_contents_in_cluster=2 --silent-mode=true -i -M master --gp_contentid=-1 -x 0 -E
IN ACTIVE! [engine] /opt/hengshi/engine-cluster/data/SegDataDir-1
hengshi 415640 1 0 Sep01 ? 00:14:51 java -Djava.io.tmpdir=/opt/hengshi/temp_data -Dserver.port=8080 -jar /opt/hengshi/lib/bootstrap-2.0.0-SNAPSHOT.jar
IN ACTIVE! [hengshi] jar /opt/hengshi/lib/bootstrap-2.0.0-SNAPSHOT.jar
hengshi 415641 1 0 Sep01 ? 00:01:13 bash /opt/hengshi/bin/hengshi-watchdog.sh
IN ACTIVE! [watchdog] /opt/hengshi/bin/hengshi-watchdog.sh
- After the upgrade is complete, access the service address through a browser to use the HENGSHI SENSE service.