Installing and using pWhoIs
From tarball to a whois server answering on port 43. The installer handles most of it; every step is also documented for doing it by hand.
Before you start: memory
If you plan to load the entire global routing table — from a gateway router with a full table, or a route-view router or server — remember it is large: over a million IPv4 prefixes and a quarter-million IPv6 prefixes today. For fast answers the server caches it in memory in a patricia tree. Be forewarned: expect to need several hundred megabytes of RAM to run both pwhoisd and pwhois-updatedb with a full table, not counting what PostgreSQL itself needs.
Quick installation
After downloading and unarchiving the package, run the installer as root:
It asks a few questions and is not especially robust, but it will carry you through. If you have suggestions or code to contribute, send them along.
Requirements
The server and update agent are written mostly in Perl and want a current Perl 5 with the DBD::Pg module and libpq, plus a current PostgreSQL. Several other Perl modules are required — install.sh lists them.
The manual steps
- Create the user and group for the
pwhoisdprocess to run as (e.g.pwhois). - Install the binaries into their permanent location — we like
/usr/sbinor/usr/local/sbin. - Set up the init script if warranted; one is provided for Debian-style systems.
- Create the database, user and password, and import the tables — see the
postgresql/directory for the scripts and SQL. - Set up the cron entry to run
pwhois-updatedbat your chosen interval. A sample crontab shows what we run. - Edit the configuration file, usually
/etc/pwhois/pwhoisd.conf. - Import your first data set with
pwhois-updatedb. - Start the
pwhoisdserver process.
You are now ready to connect and try it out: