RPMPackages - wiltondb/wiltondb GitHub Wiki

On this page:

WiltonDB packages for Linux are built from exactly the same sources used for Windows MSI installer. These builds in general will behave the same as vanilla Babelfish. Though they may contain patches backported from later versions of Babelfish.

RPM packages are provided for EL 7, 8, 9 and Fedora. They are built on Fedora Copr build service.

EL packages are built against RHEL + EPEL (for EL 8 and 9) and against CentOS + EPEL (for 7), they are expected to be compatible with all popular EL derivatives. These packages are based on postgresql Fedora package.

Install on EL 7 (CentOS example)

$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
$ sudo yum install epel-release
$ sudo yum install yum-plugin-copr
$ sudo yum copr enable wiltondb/wiltondb
$ sudo yum update
$ sudo yum install wiltondb

Install on EL 8, EL 9 or Fedora (Rocky Linux example)

$ cat /etc/redhat-release 
Rocky Linux release 8.8 (Green Obsidian)
$ sudo dnf install epel-release
$ sudo dnf install 'dnf-command(copr)'
$ sudo dnf copr enable wiltondb/wiltondb
$ sudo dnf update
$ sudo dnf install wiltondb

Create DB cluster and initialize WiltonDB

Now we need to create a database cluster and initialize Babelfish extensions there. RPM package includes wiltondb-setup to do this. wiltondb-setup uses postgresql-setup script from RHEL/Fedora "postgresql" RPM package to create a DB cluster:

$ sudo wiltondb-setup
 * Initializing database in '/var/lib/pgsql/data'
 * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log
 * Initializing WiltonDB
WARNING: DB superuser 'wilton' was created with password 'wilton', please change the password before allowing remote connections.
 * Initialized, use 'systemctl start postgresql' to start the server

Connect to WiltonDB

Now we can start the postgresql service:

$ sudo systemctl start postgresql
$ sudo systemctl status postgresql
● postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2023-11-07 11:53:52 UTC; 2s ago

By default it will listen to TDS connections on port 1433 and to PostgreSQL connections on port 5432.

Lets connect to DB over TDS port 1433 using go-sqlcmd command-line SQL client:

$ curl -LO https://github.com/microsoft/go-sqlcmd/releases/download/v1.4.0/sqlcmd-v1.4.0-linux-amd64.tar.bz2
$ tar xjvf sqlcmd-v1.4.0-linux-amd64.tar.bz2
$ ./sqlcmd -S,1433 -U wilton -P wilton
1> select @@version
2> go
Babelfish for PostgreSQL with SQL Server Compatibility - 12.0.2000.8
Oct 22 2023 17:48:32
Copyright (c) Amazon Web Services
PostgreSQL 15.4 (EL 1:15.4.wiltondb3.3_2-2.el8) on x86_64-redhat-linux-gnu (Babelfish 3.3.0)                                        

(1 row affected)