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 SE-1C from a local binary file. This method is useful when you have downloaded the Tantor SE-1C 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 SE-1C 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-se-1c-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-se-1c-server-16_16.2.0_amd64.deb
    

16.1.3. Installation from Nexus #

If you have credentials to access Nexus, you can install Tantor SE-1C 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=se-1c

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 SE-1C is installed successfully, certain post-installation commands can be used for initializing and starting the database, managing the service, uninstalling, and querying the Tantor SE-1C version.

16.1.5.1. Initializing and starting the Database #

There are two primary methods to initialize and start the database for Tantor SE-1C:

  • 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 SE-1C package. The --do-initdb flag automates the initialization process and starts the Tantor SE-1C service.

  • Using the Standard initdb Command:

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

    This method involves manually running the initdb command, typically located in the Tantor SE-1C bin directory. It's crucial to specify the data directory and run the command as the Tantor SE-1C 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-se-1c-server-16
    

In order for the Tantor SE-1C service to start automatically when the operating system boots, run the command:

systemctl enable tantor-se-1c-server-16

16.1.5.2. Querying Tantor SE-1C Version #

To check the installed version of Tantor SE-1C, 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 SE-1C Service #

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

systemctl restart tantor-se-1c-server-16

16.1.5.4. Uninstalling Tantor SE-1C #

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

apt-get remove tantor-se-1c-server-16