1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-09-29 04:45:56 -04:00

Merge branch 'master' of github.com:kimholviala/gophernicus

This commit is contained in:
fosslinux 2019-04-30 19:28:31 +10:00
commit 305aa6a5cd
2 changed files with 41 additions and 31 deletions

View File

@ -1,17 +1,18 @@
Compiling and installing Gophernicus # Compiling and installing Gophernicus
====================================
Gophernicus requires a C compiler but no extra libraries aside Gophernicus requires a C compiler but no extra libraries aside
from standard LIBC ones. Care has been taken to use only from standard LIBC ones. Care has been taken to use only
standard POSIX syscalls so that it should work pretty much on standard POSIX syscalls so that it should work pretty much on
any *nix system. any \*nix system.
To compile and install run: To compile and install run:
```
$ git clone https://github.com/kimholviala/gophernicus.git $ git clone https://github.com/kimholviala/gophernicus.git
$ cd gophernicus $ cd gophernicus
$ make $ make
$ sudo make install $ sudo make install
```
That's it - Gophernicus should now be installed, preconfigured That's it - Gophernicus should now be installed, preconfigured
and running under gopher://<HOSTNAME>/. And more often than not, and running under gopher://<HOSTNAME>/. And more often than not,
@ -19,14 +20,15 @@ It Just Works(tm). If gopher links don't seem to work you may
need to configure your public hostname explicitly in whatever need to configure your public hostname explicitly in whatever
config file Gophernicus is using. config file Gophernicus is using.
By default Gophernicus serves gopher documents from /var/gopher By default Gophernicus serves gopher documents from `/var/gopher`
although that can be changed by using the -r <root> parameter. although that can be changed by using the `-r <root>` parameter.
To enable virtual hosting create hostname directories under To enable virtual hosting create hostname directories under
the gopher root and make sure you have at least the primary the gopher root and make sure you have at least the primary
hostname (the one set with -h <hostname>) directory available hostname (the one set with `-h <hostname>`) directory available
(mkdir /var/gopher/$HOSTNAME). (`mkdir /var/gopher/$HOSTNAME`).
<<<<<<< HEAD:INSTALL
Dependencies Dependencies
============ ============
@ -66,15 +68,17 @@ These were obtained from a base docker installation, what we
Other installation targets Other installation targets
========================== ==========================
=======
## Other installation targets
>>>>>>> 82a1abebc4bfabc43ef6b27f0627f526984eaf30:INSTALL.md
Suppose your server runs systemd, but you'd rather have Gophernicus Suppose your server runs systemd, but you'd rather have Gophernicus
started with inetd or xinetd. To do that, do "make install-inetd" started with inetd or xinetd. To do that, do `make install-inetd`
or "make install-xinetd". Likewise use "make uninstall-inetd" or or `make install-xinetd`. Likewise use `make uninstall-inetd` or
"make uninstall-xinetd" to uninstall Gophernicus. `make uninstall-xinetd` to uninstall Gophernicus.
Compiling with TCP wrappers ## Compiling with TCP wrappers
===========================
Gophernicus uses no extra libraries... well... except libwrap Gophernicus uses no extra libraries... well... except libwrap
(TCP wrappers) if it is installed with headers in default Unix (TCP wrappers) if it is installed with headers in default Unix
@ -85,52 +89,53 @@ non-standard place and want to force compile with wrappers
just run 'make withwrap'. just run 'make withwrap'.
For configuring IP access lists with TCP wrappers, take a look For configuring IP access lists with TCP wrappers, take a look
at the files /etc/hosts.allow and /etc/hosts.deny (because the at the files `/etc/hosts.allow` and `/etc/hosts.deny` (because the
manual pages suck). Use the daemon name 'in.gophernicus' to manual pages suck). Use the daemon name 'in.gophernicus' to
make your access lists. make your access lists.
Running with traditional inetd superserver ## Running with traditional inetd superserver
==========================================
If you want to run Gophernicus under the traditional Unix inetd, the If you want to run Gophernicus under the traditional Unix inetd, the
below line should be added to your /etc/inetd.conf and the inetd below line should be added to your `/etc/inetd.conf` and the inetd
process restarted. process restarted.
```
gopher stream tcp nowait nobody /usr/sbin/in.gophernicus in.gophernicus -h <hostname> gopher stream tcp nowait nobody /usr/sbin/in.gophernicus in.gophernicus -h <hostname>
```
The Makefile will automatically do this for you and remove it when The Makefile will automatically do this for you and remove it when
uninstalling. uninstalling.
Compiling on Debian Linux (and Ubuntu) ## Compiling on Debian Linux (and Ubuntu)
======================================
The above commands work on Debian just fine, but if you prefer The above commands work on Debian just fine, but if you prefer
having everything installed as packages run "make deb" instead having everything installed as packages run `make deb` instead
of plain "make". If all the dependencies were in place you'll of plain `make`. If all the dependencies were in place you'll
end up with an offical-looking deb package in the parent end up with an offical-looking deb package in the parent
directory (don't ask - that's just how it works). And instead directory (don't ask - that's just how it works). And instead
of "sudo make install" you should just install the deb with of `sudo make install` you should just install the deb with
"dpkg -i ../gophernicus_*.deb" after which It Should Just `dpkg -i ../gophernicus_*.deb` after which It Should Just
Work(tm). Work(tm).
If you need TCP wrappers support on Debian/Ubuntu, please If you need TCP wrappers support on Debian/Ubuntu, please
install libwrap0-dev before compiling. install libwrap0-dev before compiling.
Cross-compiling ## Cross-compiling
===============
Cross-compiling to a different target architecture can be done Cross-compiling to a different target architecture can be done
by defining HOSTCC and CC to be different compilers. HOSTCC by defining HOSTCC and CC to be different compilers. HOSTCC
must point to a local arch compiler, and CC to the target must point to a local arch compiler, and CC to the target
arch one. arch one.
```
$ make HOSTCC=gcc CC=target-arch-gcc $ make HOSTCC=gcc CC=target-arch-gcc
```
Shared memory issues ## Shared memory issues
==================== ====================
Gophernicus uses SYSV shared memory for session tracking and Gophernicus uses SYSV shared memory for session tracking and
@ -144,20 +149,22 @@ to the wrong user.
If that happens you can simply delete the memory block and If that happens you can simply delete the memory block and
let Gophernicus recreate it - no harm done: let Gophernicus recreate it - no harm done:
```
$ sudo make clean-shm $ sudo make clean-shm
```
Porting to different platforms ## Porting to different platforms
==============================
If you need to port Gophernicus to a new platform, please take If you need to port Gophernicus to a new platform, please take
a look at gophernicus.h which has a bunch of HAVE_* #defines. a look at gophernicus.h which has a bunch of `HAVE_*` `#defines`.
Fiddling with those usually makes it possible to compile a working Fiddling with those usually makes it possible to compile a working
server. If you succeed in compiling Gophernicus to a new server. If you succeed in compiling Gophernicus to a new
platform please send the patches to platform please send the patches to
<gophernicus at gophernicus dot org> so we can include them into <gophernicus at gophernicus dot org> so we can include them into
the next release. the next release.
<<<<<<< HEAD:INSTALL
Supported Platforms Supported Platforms
=================== ===================
@ -171,3 +178,5 @@ Supported Platforms
| Arch Linux | up to date | | Arch Linux | up to date |
| Gentoo | up to date | | Gentoo | up to date |
| Alpine Linux | Edge, 3.9 | | Alpine Linux | Edge, 3.9 |
=======
>>>>>>> 82a1abebc4bfabc43ef6b27f0627f526984eaf30:INSTALL.md

View File

@ -59,7 +59,7 @@ daemon. It is licensed under the BSD license.
## Setting up a gopher site ## Setting up a gopher site
After succesfully installing Gophernicus (see INSTALL) you need to set After succesfully installing Gophernicus (see [INSTALL](./INSTALL.md)) you need to set
up the gopher root directory. By default Gophernicus serves documents up the gopher root directory. By default Gophernicus serves documents
from /var/gopher so start by creating that directory and making sure from /var/gopher so start by creating that directory and making sure
it's world-readable. Then, simply add files and directories under your it's world-readable. Then, simply add files and directories under your
@ -96,7 +96,7 @@ By default all gopher menus are automatically generated from the
content of the directory being viewed. If you want to have content of the directory being viewed. If you want to have
informational text along with the files, or if you want to completely informational text along with the files, or if you want to completely
replace the generated menu with your own you need to take a look at replace the generated menu with your own you need to take a look at
gophermaps. See the file README.gophermap for more information. gophermaps. See the [README.gophermap](./README.gophermap) for more information.
## Gophertags ## Gophertags
@ -113,7 +113,7 @@ littering the file system with spaces and weird characters.
## Personal gopherspaces ## Personal gopherspaces
Gophernicus supports users personal gopherspaces. If a user has Gophernicus supports users personal gopherspaces. If a user has
world-readable directory called public_gopher/ under his home, a world-readable directory called `public_gopher` under his home, a
request for `gopher://HOSTNAME/1/~user/` will serve documents from request for `gopher://HOSTNAME/1/~user/` will serve documents from
that directory. that directory.
@ -292,3 +292,4 @@ Example:
accept = :::7070 accept = :::7070
connect = 127.0.0.1:70 connect = 127.0.0.1:70
protocol = proxy protocol = proxy