Software Upgrade

In this example, the installation path is /opt/hengshi, the download path is ~/pkgs, and the preparation file is introduced in the section Installation.

Stop the Old Version Service

$ sudo su - hengshi             #Switch to the product runtime user
$ cd /opt/hengshi               #Enter the target installation directory
$ bin/hengshi-sense-bin stop all    #Stop the old version service

Install

$ sudo su - hengshi             #Switch to the product runtime user
$ cd ~/pkgs/hengshi-sense-[version]           #Switch to the target decompression directory
$ ./hs_install -p /opt/hengshi  #Install the new version, the script will automatically back up the data of the previous version, if you do not wish to back up, please add the parameter -s t

The installation program outputs the following message to indicate successful installation:

SUCCESSED! installed to xxxxx

Update Dependencies

This step requires the executing user to have sudo privileges, after successful execution, you can revoke sudo privileges (the program does not require sudo privileges for daily operation)

$ sudo su - hengshi             #Switch to the product runtime user
$ cd /opt/hengshi                 #Enter the target installation directory
$ bin/hengshi-sense-bin init-os all  #Initialize the OS

Start

$ sudo su - hengshi             #Switch to the product runtime user
$ cd /opt/hengshi                #Enter the target installation directory
$ bin/hengshi-sense-bin start all   #Start the new version service

Successful operation prompts the below message:

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
[2018-09-08.13:19:49.655][engine.sh:35][ INFO ]: hengshi home /opt/hengshi
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