Skip to content
dgeo edited this page Nov 16, 2023 · 6 revisions

Introduction

This document is compiled from suggestions and comments on the Netdisco mail lists. We’re grateful for the help, and if you have any additions please do let the project staff know.

You could also look at the following guide for FreeBSD 11: http://www.davidbolton.com/?p=681

Using netdisco package

netdisco can be installed with all dependencies via the net-mgmt/netdisco port

pkg install netdisco will install netdisco code with all dependencies and a working rc script but postgresql server.

Then use su -l netdisco to use netdisco commands.

All netdisco commands will be accessible without ~/bin/ prefix.

If you want to deploy postgresql on the same host, pkg install postgresqlXX-server (where XX is the same version as postgresqlXX-client already installed), then follow the install message.

configuration

Config file is here: /usr/local/etc/netdisco/environments/deployment.yml

Initialisation

netdisco-deploy for upgrades or new deployment (as user netdisco with it’s environment, su -l netdisco or sudo -i netdisco -s)

Startup

To enable rc script: sysrc netdisco_enable=YES, then service netdisco start to launch netdisco web frontend on port 5000 without reboot.

Alternatively, you can follow the rest of this page to install latest version.

Manual install

install dependencies

You need to pkg install:

  • Perl (if not already installed)

  • p5-DBD-Pg (will also pull in postgresqlXX-client)

  • postgresqlXX-server

  • net-snmp (should install the Perl binding SNMP.pm)

  • openssl

  • p5-Authen-TacacsPlus

Additional Steps

Netdisco User

pw useradd netdisco -N -m -s /bin/sh -w no

PostgreSQL Setup

/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start

Make sure PostgreSQL starts at boot by adding the following to “/etc/rc.conf”:

postgresql_enable="YES"

When installing postgresqlXX-server port, it creates the pgsql user with “nologin” shell (the user is postgres for PostgreSQL >= 9.6 on FreeBSD). As root, do vipw and change the shell to /bin/sh or whichever shell you want, so that you can do the createuser step from the main instructions.

pgtune doesn’t seem to work on NetBSD. This needs looking into. Nothing will break, but it just means the server probably isn’t tuned to your system’s hardware (RAM, etc).

Run Control Script

# PROVIDE: netdiscoweb
# REQUIRE: DAEMON
# BEFORE:  LOGIN
# KEYWORD: shutdown
rcvar="netdisco_enable"