Linux HOWTOs

About | Home | Search


HOWTO: whois
Description: Client for the whois directory service
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# whois 5.0.11
# ============
# If you don't like this particular 'whois' for some reason, you may
# want to check out GNU jwhois as an alternative:
# http://www.gnu.org/software/jwhois/
#
# The whois covered below is the one included with Slackware, Debian, Ubuntu,
# etc.

# Slackware 12.0: whois 4.7.21
# Slackware 12.1, 12.2, 13.0: whois 4.7.26
# Slackware 13.1: whois 5.0.2

# Prerequisites:
# Perl

# Slackware 8.0 and down included whois in the 'tcpip1' package, then
# in the 'tcpip' package after that, and I believe somewhere around 9.0
# is when the 'whois' package was created.

# If you want to uninstall whois, or ensure that all old files are removed
# before installing a new version, skip down to the bottom for uninstall
# instructions.

cd
test -f installed/whois_5.0.11.tar.gz && mv installed/whois_5.0.11.tar.gz .
test ! -f whois_5.0.11.tar.gz &&
 wget http://ftp.debian.org/debian/pool/main/w/whois/whois_5.0.11.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "whois-*" -exec rm -r {} \;
tar xzvf ~/whois_5.0.11.tar.gz
cd whois-5.0.11
test $UID = 0 && chown -R root:root .

# Compile it
make

# Become root to install it
su

# Remove the old Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg whois

# Install the new version
#
# I don't use 'make install' here because I don't want to install the
# included 'mkpasswd' in /usr/bin, which may be confused with the 'mkpasswd'
# that is included with the 'shadow' package in /usr/sbin.  (you can use
# 'make install-whois' to only install whois though)
#
# ...and because I'd have to patch/edit the Makefile to install the man
# pages in /usr/man instead of /usr/share/man.  That would be nice if
# a commandline specifyable $MANDIR were made available in there in the
# future, but certainly not a big deal to do this instead.  FYI, if you
# have a /usr/share/man -> /usr/man symlink, it doesn't matter.
install -m 0755 whois /usr/bin/
install -m 0644 whois.1 /usr/man/man1/

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/whois_*.tar.gz
mv whois_5.0.11.tar.gz installed/


# If you ever want to uninstall whois, this should do it:
su
test -x /sbin/removepkg && /sbin/removepkg whois
find /usr/doc -maxdepth 1 -type d -name "whois-*" -exec rm -r {} \;
find /usr/share/locale -type f -name "whois.mo" -exec rm {} \;
rm -f /usr/bin/whois /usr/man/man1/whois.1 /usr/man/man1/whois.1.gz \
 /usr/man/cat1/whois.1*
exit
find ~/src -maxdepth 1 -type d -name "whois-*" -exec rm -r {} \;
rm -f ~/installed/whois-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>