3. Installation

By the end of this chapter: You install GritDB in the standard path (~/gritdb1) and confirm that the installation is intact.

Time: 20 min | Prerequisite: all items in chapter 2 pass

3.1 Run the installation

Run the script without options to install in the standard path (~/gritdb1, port 5432).

cd ~/pkg/gritdb-*/
./install_gritdb.sh

Expected output:

======================================================================
GritDB Install (from dist)
----------------------------------------------------------------------
Edition        = <STANDARD or ENTERPRISE>
Version        = 1.1
Build commit   = <commit hash>
Prefix         = /home/gritdb/gritdb1
Install Log    = /home/gritdb/gritdb1/log/install_gritdb_<timestamp>.log
======================================================================
▶ 1.1 Verifying dist integrity (manifest)                  ... OK
▶ 2.1 Deploying files to prefix                            ... OK
▶ 3.1 Initializing PostgreSQL data directory               ... OK
[INFO] PostgreSQL memory: shared_buffers=<value> effective_cache_size=<value> work_mem=<value> (memory <M>MB - engine storage <U>MB - engine query <B>MB = PostgreSQL <P>MB)
▶ 4.1 Merging postgresql.conf (managed block)              ... OK
▶ 5.1 Recording install anchor (.gritdb_installed)         ... OK

Verifying installation...
  postgres  CHECK
  gritsurfer.so  CHECK
  gritsurfer.control  CHECK
  gritsurfer--1.0.sql  CHECK
  grit_admin  CHECK
  grit_admin_client  CHECK
  grit_catalog_process  CHECK
  shared_preload_libraries = gritsurfer  CHECK
  wal_level = logical  CHECK
  search_path includes gritdb  CHECK
  build commit = <commit hash>
  pg port = 5432 (source of truth: /home/gritdb/gritdb1/datafiles/pgdata/postgresql.conf)
  instance id = <instance ID>

======================================================================
Install complete.
Install log written to: /home/gritdb/gritdb1/log/install_gritdb_<timestamp>.log

NEXT:
  Start:  /home/gritdb/gritdb1/bin/gritdb-start
  Stop:   /home/gritdb/gritdb1/bin/gritdb-stop
  After start, confirm preload took effect:
    /home/gritdb/gritdb1/bin/psql -p 5432 -d postgres -c "SHOW shared_preload_libraries;"

3.2 Read the installation result

What you see Meaning What to do
OK for all 5 steps, CHECK for every item, and Install complete. The installation succeeded Go to 3.3
[INFO] PostgreSQL memory: … (between 3.1 and 4.1) The PostgreSQL memory values set from this server’s memory Nothing to do (Admin, chapter 5)
[WARN] PostgreSQL memory share is below 4GB … The memory is small, so PostgreSQL keeps its defaults Nothing to do. Support takes performance questions after you raise the server to the minimum specification (2.4 checklist item 5)
FAIL on a step and Install failed at step: ... The installation stops at that step. The last 5 log lines also appear, each with | Search chapter 7 for the error text you see
missing! FAIL instead of CHECK An installation file is missing GDB-INSTALL-003 (bring in the files again)

3.3 Confirm the installation

ls -a ~/gritdb1/.gritdb_installed
jq -r .product_version ~/gritdb1/share/gritdb/manifest.json

Expected output:

/home/gritdb/gritdb1/.gritdb_installed
1.1

3.4 Notes

  • If you install again in the same path, the existing data stays. In that case, installer step 3.1 shows SKIP (existing data kept; --reinit-data to reinitialize). To reinitialize (create new data), see Admin, chapter 3.
  • Keep the installation files in ~/pkg until you install the next version. They are for reinstallation and re-verification.
  • ⚠ Do not install as root (GDB-INSTALL-001). If you must install as root, see Admin, chapter 2.
  • ⚠ The default authentication after installation is trust, so every OS user on the same server can connect as a superuser. If the server has other OS users, do step 2 of Admin 11.3 before the first start (4.1). In that case, do the other steps after the start.

If a problem occurs

Learn more