Installing PIKT on OpenBSD
I’m putting PIKT onto my OpenBSD machine, as a master for my other Linux machines. I’ll probably have PIKT jobs running on the master as well.
The install works fine if you just ./configure && gmake && gmake
install. I stuck the sources in /usr/src. If you don’t give
--prefix to configure it defaults to sticking everything under a
“virtual root” in /usr/local/pikt. What I mean by “virtual root”
is that you get /usr/local/pikt/bin where all the PIKT binaries
are, /usr/local/pikt/var/log where logs are, etc. Note that I
used gmake; install the gmake (GNU make) package. I also had
to install the bison package. flex appears to have been on the
system. rx is apparently an (old?) GNU regular expression library. I
didn’t have to install this — and there wasn’t a package for it.
I’ll try and keep the fact that I might be missing a requirement in
mind if stuff starts not working as I move forward. (I don’t have
gawk either. I don’t know if that’s a requirement or not.)
I’m going through the PIKT “Tutorial and Getting
Started”. First note:
make sure you don’t have 127.0.0.1 myhostname myhostname.mydomain
in /etc/hosts (where myhostname and mydomain are your real
host name and domain name) because it mucks things up. Over the years
I’ve had various Linux distributions tell me that your host name
shouldn’t be in there as 127.0.0.1, and various others put it in
there, so I’m not real sure which is correct. However, going through
the examples in the above mentioned tutorial with your host name
pointed to 127.0.0.1 will cause weird things like call-backs to the
master to fail. I commented mine out.
Second note: apparently it’s not safe to run piktc with a relative
path. I was sitting in /usr/local/pikt/lib/configs and I tried to
execute the first example’s alert with ../../bin/piktc. Lo,
piktc_svc somehow decided it would be smart to try and run
../../bin/pikt to send the e-mail relating to my alert? I have no
idea how this happens, but when I started piktc with an absolute
path (/usr/local/pikt/bin/piktc) it works. Bizarre.