17.1. Downloading and Executing the Installer#

17.1. Downloading and Executing the Installer

17.1. Downloading and Executing the Installer

17.1.1. Installer script

Begin by copying the installer script db_installer.sh from the ISO-certified image. You can find an ISO-certified image in your personal account or on a physical disk.

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

chmod +x db_installer.sh

17.1.2. Installation

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

  1. Download from ISO-certified image 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 Certified 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-certified-server-15_15.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-certified-server-15_15.2.0_amd64.deb
    

17.1.3. Post-Installation Commands

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

17.1.3.1. Initializing and starting the Database

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

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

  • Using the Standard initdb Command:

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

    This method involves manually running the initdb command, typically located in the Tantor Certified bin directory. It's crucial to specify the data directory and run the command as the Tantor Certified 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-certified-server-15
    

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

systemctl enable tantor-certified-server-15

17.1.3.2. Querying Tantor Certified Version

To check the installed version of Tantor Certified, 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()\""

17.1.3.3. Managing the Tantor Certified Service

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

systemctl restart tantor-certified-server-15

17.1.3.4. Uninstalling Tantor Certified

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

apt-get remove tantor-certified-server-15