2014-01-25 04:21:40 -05:00
|
|
|
Compiling and installing Gophernicus
|
|
|
|
====================================
|
|
|
|
|
|
|
|
Gophernicus requires a C compiler but no extra libraries aside
|
|
|
|
from standard LIBC ones. Care has been taken to use only
|
|
|
|
standard POSIX syscalls so that it should work pretty much on
|
2014-01-25 08:33:07 -05:00
|
|
|
any *nix system.
|
2014-01-25 04:21:40 -05:00
|
|
|
|
|
|
|
To compile and install run:
|
|
|
|
|
|
|
|
$ gzip -cd gophernicus-*.tar.gz | tar xvf -
|
|
|
|
$ cd gophernicus-*
|
|
|
|
$ make
|
|
|
|
$ sudo make install
|
|
|
|
|
2015-12-29 08:21:36 -05:00
|
|
|
That's it - Gophernicus should now be installed, preconfigured
|
|
|
|
and running under gopher://<HOSTNAME>/. And more often than not,
|
|
|
|
It Just Works(tm). If gopher links don't seem to work you may
|
|
|
|
need to configure your public hostname explicitly in whatever
|
|
|
|
config file Gophernicus is using.
|
2014-01-25 04:21:40 -05:00
|
|
|
|
|
|
|
By default Gophernicus serves gopher documents from /var/gopher
|
|
|
|
although that can be changed by using the -r <root> parameter.
|
|
|
|
To enable virtual hosting create hostname directories under
|
|
|
|
the gopher root and make sure you have at least the primary
|
|
|
|
hostname (the one set with -h <hostname>) directory available
|
|
|
|
(mkdir /var/gopher/$HOSTNAME).
|
|
|
|
|
|
|
|
|
2016-01-01 03:12:19 -05:00
|
|
|
Compiling with TCP wrappers
|
|
|
|
===========================
|
|
|
|
|
|
|
|
Gophernicus uses no extra libraries... well... except libwrap
|
|
|
|
(TCP wrappers) if it is installed with headers in default Unix
|
|
|
|
directories at the time of compiling. If you have the headers
|
|
|
|
installed and don't want wrapper support, run 'make generic'
|
|
|
|
instead of just 'make', and if you have wrappers installed in
|
|
|
|
non-standard place and want to force compile with wrappers
|
|
|
|
just run 'make withwrap'.
|
|
|
|
|
|
|
|
For configuring IP access lists with TCP wrappers, take a look
|
|
|
|
at the files /etc/hosts.allow and /etc/hosts.deny (because the
|
|
|
|
manual pages suck). Use the daemon name 'in.gophernicus' to
|
|
|
|
make your access lists.
|
|
|
|
|
|
|
|
|
2015-12-29 08:21:36 -05:00
|
|
|
Running with traditional inetd superserver
|
|
|
|
==========================================
|
|
|
|
|
|
|
|
If you want to run Gophernicus under the traditional Unix
|
|
|
|
inetd, add the below line to your /etc/inetd.conf and restart
|
|
|
|
the inetd process.
|
|
|
|
|
|
|
|
gopher stream tcp nowait nobody /usr/sbin/in.gophernicus in.gophernicus -h <hostname>
|
|
|
|
|
|
|
|
|
2014-01-25 04:21:40 -05:00
|
|
|
Compiling on Debian Linux (and Ubuntu)
|
|
|
|
======================================
|
|
|
|
|
|
|
|
The above commands work on Debian just fine, but if you prefer
|
|
|
|
having everything installed as packages run "make deb" instead
|
|
|
|
of plain "make". If all the dependencies were in place you'll
|
|
|
|
end up with an offical-looking deb package in the parent
|
|
|
|
directory (don't ask - that's just how it works). And instead
|
|
|
|
of "sudo make install" you should just install the deb with
|
|
|
|
"dpkg -i ../gophernicus_*.deb" after which It Should Just
|
|
|
|
Work(tm).
|
|
|
|
|
2016-01-01 03:12:19 -05:00
|
|
|
If you need TCP wrappers support on Debian/Ubuntu, please
|
|
|
|
install libwrap0-dev before compiling.
|
|
|
|
|
2014-01-25 04:21:40 -05:00
|
|
|
|
|
|
|
Cross-compiling
|
|
|
|
===============
|
|
|
|
|
|
|
|
Cross-compiling to a different target architecture can be done
|
|
|
|
by defining HOSTCC and CC to be different compilers. HOSTCC
|
|
|
|
must point to a local arch compiler, and CC to the target
|
|
|
|
arch one.
|
|
|
|
|
|
|
|
$ make HOSTCC=gcc CC=target-arch-gcc
|
|
|
|
|
|
|
|
|
|
|
|
Shared memory issues
|
|
|
|
====================
|
|
|
|
|
|
|
|
Gophernicus uses SYSV shared memory for session tracking and
|
|
|
|
statistics. It creates the shared memory block using mode 600
|
|
|
|
and a predefined key which means that a shared memory block
|
|
|
|
created with one user cannot be used by another user. Simply
|
2015-12-31 02:30:39 -05:00
|
|
|
said, running in.gophernicus under various different user
|
|
|
|
accounts may create a situation where the memory block is locked
|
|
|
|
to the wrong user.
|
2014-01-25 04:21:40 -05:00
|
|
|
|
|
|
|
If that happens you can simply delete the memory block and
|
2015-12-31 02:30:39 -05:00
|
|
|
let Gophernicus recreate it - no harm done:
|
2014-01-25 04:21:40 -05:00
|
|
|
|
2015-12-31 02:30:39 -05:00
|
|
|
$ sudo make clean-shm
|
2014-01-25 04:21:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
Porting to different platforms
|
|
|
|
==============================
|
|
|
|
|
|
|
|
If you need to port Gophernicus to a new platform, please take
|
|
|
|
a look at gophernicus.h which has a bunch of HAVE_* #defines.
|
|
|
|
Fiddling with those usually makes it possible to compile a working
|
|
|
|
server. If you succeed in compiling Gophernicus to a new
|
|
|
|
platform please send the patches to kim@holviala.com so I can
|
|
|
|
include them into the next release.
|
|
|
|
|
|
|
|
Tested (and semi-supported) platforms include:
|
|
|
|
|
2015-12-29 03:46:48 -05:00
|
|
|
OS Arch Compiler
|
|
|
|
+---------------+-------------+-------------+
|
|
|
|
AIX 5 POWER3 gcc 4
|
|
|
|
AIX 6 POWER4 gcc 4
|
|
|
|
AIX 7 POWER5 gcc 4
|
|
|
|
CentOS 5 x86_64 gcc 4
|
2015-12-30 04:37:11 -05:00
|
|
|
CentOS 7 x86_64 gcc 4
|
2015-12-29 08:21:36 -05:00
|
|
|
Debian Squeeze armv5tel gcc 4
|
2015-12-29 03:46:48 -05:00
|
|
|
Debian Wheezy i386 gcc 4
|
|
|
|
Debian Wheezy x86_64 gcc 4
|
2015-12-29 08:21:36 -05:00
|
|
|
Debian Jessie x86_64 gcc 4
|
2015-12-29 03:46:48 -05:00
|
|
|
Maemo 5 armv7l gcc 4
|
|
|
|
MacOSX 10.5 i386 gcc 4
|
|
|
|
MacOSX 10.7 x86_64 llvm-gcc 4
|
|
|
|
MacOSX 10.8 x86_64 clang 3
|
|
|
|
MacOSX 10.10 x86_64 clang 6
|
|
|
|
MacOSX 10.11 x86_64 clang 7
|
|
|
|
NetBSD 5 x86_64 gcc 4
|
|
|
|
Haiku R1 i386 gcc 2
|
2014-01-25 04:21:40 -05:00
|
|
|
|