There does not seem to be any guidance available for installing QuestDB on FreeBSD. An enquiry on Slack created helpful suggestions, but nothing directly actionable.
For posteriority I decided to create my own installer. This seems to do the trick, and is modelling on the Homebrew configuration, for lack of a better idea.
As root:
pkg install bash
curl -LO https://github.com/questdb/questdb/releases/download/6.0.4/questdb-6.0.4-rt-freebsd-amd64.tar.gz
tar xvf questdb-6.0.4-rt-freebsd-amd64.tar.gz
cd questdb-6.0.4-rt-freebsd-amd64
mv bin/* /usr/local/bin/
mv lib/* /usr/local/lib/
mkdir /usr/local/var
questdb.sh start -d /usr/local/var/questdb
Create /usr/local/etc/rc.d/questdb with contents:
#!/bin/sh
# PROVIDE: questdb
# REQUIRE: FILESYSTEMS NETWORKING
. /etc/rc.subr
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
name="questdb"
rcvar=`set_rcvar`
command="/usr/local/bin/questdb.sh"
questdb_flags="-d /usr/local/var/questdb"
start_cmd="$command start $questdb_flags"
stop_cmd="$command stop $questdb_flags"
load_rc_config $name
: ${questdb_enable="NO"}
run_rc_command "$1"
- Enable with
sysrc questdb_enable="YES" - Then reboot or
service questdb onestartto get it running.
Note:
- I had to install
bash, required byquestdb.sh. - I installed the contents of
binandlib. Not sure if it is all required, but there were no clashes on a fresh FreeBSD 12.2-RELEASE-p1 install so I figured it can’t hurt. - I didn’t install the contents of
confor anything else in the archive - none of it seems to be relevant or referenced anywhere in the docs. - While the
vardirectory had to be created, QuestDB itself creates all other required directories (and their contents), provided the containing directory is specified in the-dflag. - The rc script is really cumbersome and documentation out there is not good at all. Still not quite sure what some of it does, but it mostly works.
- Really no more functionality that a simple
@rebootline in root's crontab at this stage, but rc is the FreeBSD-native way. - crontab solution would simple be:
( ( crontab -l ; echo "@reboot /usr/local/bin/questdb.sh start -d /var/local/var/questdb" ) | crontab - ) >& /dev/null
- Really no more functionality that a simple