pkg install zerotier nano wget
pkg install postgresql11-server-11.0_2 postgresql11-contrib-11.0 postgresql11-client-11.0

su postgres
cd
wget --no-check-certificate https://omnidb.org/dist/2.17.0/omnidb-plugin_2.17.0-freebsd-amd64.tar.gz
tar -xzvf omnidb-plugin_2.17.0-freebsd-amd64.tar.gz
exit

cp /var/db/postgres/omnidb-plugin_2.17.0-freebsd-amd64/omnidb_plugin_10.so /usr/local/lib/postgresql/omnidb_plugin.so

service zerotier onestart
zerotier-cli join <network>

/usr/local/etc/rc.d/postgresql oneinitdb

nano /var/db/postgres/data10/postgresql.conf
  listen_addresses = '*'
  shared_preload_libraries = 'omnidb_plugin'

nano /var/db/postgres/data10/pg_hba.conf

su postgres
cd
/usr/local/bin/pg_ctl -D /var/db/postgres/data10 -l logfile start

psql
  create user omnidb with password 'omnidb';
  create database omnidb_tests owner omnidb;

cd ~/omnidb-plugin_2.17.0-freebsd-amd64
psql -d omnidb_tests -f debugger_schema.sql
psql -d omnidb_tests -f sample_functions.sql
psql -d omnidb_tests -c 'grant all on schema omnidb to omnidb'
psql -d omnidb_tests -c 'grant all on all tables in schema omnidb to omnidb'
