Nocol is provided as a 'port' and not as a binary 'package'. The building of the port automatically fetches the source code - but to save everyone in the class fetching it separately, we can collect the source tarball from a local FTP server first.
# cd /usr/ports/distfiles # ftp 22.214.171.124 cd pub/distfiles get nocol-4.3.tar.gz quit
Now build as per a normal FreeBSD package
# cd /usr/ports/net/nocol # make Give suitable answers to questions, or accept the defaults # make install
Create a symlink so that users can just type 'nocol':
# ln -s /usr/local/nocol/bin/netconsole /usr/local/bin/nocol
Finally, create a user called 'nocol' which will create the database files, and change the ownership of the directories where nocol needs write access.
# adduser Username is 'nocol' # chown -R nocol /usr/local/nocol/run # chown -R nocol /usr/local/nocol/data
There are man pages, but you have to give the correct path to find them:
# man -M /usr/local/nocol/man nocol-overview
Also check the files contained within the package:
# pkg_info -aI # pkg_info nocol-4.3 # pkg_info -L nocol-4.3 | less
# cd /usr/local/nocol/etc # cp samples/ippingmon-confg . # vi ippingmon-confg List machine name on left and IP address on right Now start the ipping monitor: # su nocol $ /usr/local/nocol/bin/ippingmon & $ exit
(Make sure you always start and stop monitor programs as user 'nocol' otherwise files become owned by root)
Login as any user (non-root) and type 'nocol'. Use L to switch the display level (1-4, Critical to Info)
/usr/local/nocol/bin/genweb.pl and follow the
instructions. In particular, change these two lines:
... $baseurl = "http://t2-noc.t2.ws.afnog.org/nocol/htmldata" ; ... $webdir = "/usr/local/www/nocol/htmldata"; ...
Then make the required directories, and try running genweb.pl as nocol
# mkdir -p /usr/local/www/nocol/htmldata # chown nocol /usr/local/www/nocol/htmldata # cd /usr/local/www/nocol/htmldata # cp -pr /usr/ports/net/nocol/work/nocol-4.3/webnocol/gifs . # su nocol $ /usr/local/nocol/bin/genweb.pl $ exit
(P.S. the 'gifs' directory will have been deleted if you did a 'make clean' after installing the package; the packager forgot to include it in the package itself)
This automatically updates the web page every minute, and also does some nocol housekeeping (checking that the daemons are running etc)
# crontab -u nocol /usr/local/nocol/bin/crontab.nocol
Then sort out the remaining permission problems (check the mails sent to /var/mail/nocol !)