16.1. Downloading and Executing the Installer#

16.1. Downloading and Executing the Installer

16.1. Downloading and Executing the Installer #

16.1.1. Installer script #

Begin by downloading the installer script from the provided URL:

wget https://public.tantorlabs.ru/db_installer.sh

Once the download completes, grant execution permissions to the script:

chmod +x db_installer.sh

16.1.2. Installation from a local file #

This section details the process of installing Tantor BE from a local binary file. This method is useful when you have downloaded the Tantor BE binary package and wish to install it directly from your local file system.

  1. Download from personal account a .deb or .rpm file of a package compatible with your operating system and architecture.

  2. Move this file to the directory where the previously downloaded installer script db_installer.sh.

  3. Run the Tantor BE installation using the installer script db_installer.sh by specifying the path to the file .deb or .rpm of the package:

    ./db_installer.sh --from-file=<path to .deb or .rpm file of a package>
    

    For example, if you downloaded .deb package tantor-be-server-16_16.2.0_amd64.deb to the same directory as db_installer.sh then the command will look like this:

    ./db_installer.sh --from-file=./tantor-be-server-16_16.2.0_amd64.deb
    

16.1.3. Installation from Nexus #

If you have credentials to access Nexus, you can install Tantor BE directly from it.

Before running the installer, set the necessary environment variables. These variables provide the installer with credentials and the URL to access the Nexus repository:

export NEXUS_USER="<user name>"
export NEXUS_USER_PASSWORD="<password>"
export NEXUS_URL="nexus.tantorlabs.ru"

You can then run the installer with the desired options. For instance, to initialize the database after installation, specify the major version and edition, use the following command:

./db_installer.sh \
  --do-initdb \
  --major-version=16 \
  --edition=be

16.1.4. Installation Tantor Basic Edition for evaluation use #

Only the Tantor Basic Edition (BE) is available for evaluation purposes. To install the BE edition, it is necessary to set only one environment variable NEXUS_URL with the following value:

export NEXUS_URL="nexus-public.tantorlabs.ru"

And then you can run the installer script with the desired parameters:

./db_installer.sh \
  --do-initdb \
  --major-version=16 \
  --edition=be

16.1.5. Post-Installation Commands #

Once Tantor BE is installed successfully, certain post-installation commands can be used for initializing and starting the database, managing the service, uninstalling, and querying the Tantor BE version.

16.1.5.1. Initializing and starting the Database #

There are two primary methods to initialize and start the database for Tantor BE:

  • Using the installer script db_installer.sh with --do-initdb Flag:

    ./db_installer.sh --do-initdb
    

    This approach uses the installation script provided with the Tantor BE package. The --do-initdb flag automates the initialization process and starts the Tantor BE service.

  • Using the Standard initdb Command:

    su - postgres -c "/opt/tantor/db/16/bin/initdb -D /var/lib/postgresql/tantor-be-16/data"
    

    This method involves manually running the initdb command, typically located in the Tantor BE bin directory. It's crucial to specify the data directory and run the command as the Tantor BE process owner postgres.

    After successfully running initdb, the PostgreSQL server can be started using the pg_ctl command or through the system's service management tools with command:

    systemctl start tantor-be-server-16
    

In order for the Tantor BE service to start automatically when the operating system boots, run the command:

systemctl enable tantor-be-server-16

16.1.5.2. Querying Tantor BE Version #

To check the installed version of Tantor BE, you can execute a SQL command that queries the version. As the postgres user, you can retrieve the version information as follows:

su - postgres -c "psql -U postgres -d postgres -c \"select tantor_version()\""

16.1.5.3. Managing the Tantor BE Service #

To manage the Tantor BE service, such as restarting after configuration changes, use the systemctl command. For example, to restart the Tantor BE server:

systemctl restart tantor-be-server-16

16.1.5.4. Uninstalling Tantor BE #

To uninstall Tantor BE, use the package management system of your distribution. For Debian-based systems, you can remove Tantor BE using the following command:

apt-get remove tantor-be-server-16