📄 ch50.htm
字号:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<font face="Arial,Helvetica" size="-1" color="#006666">
<b>Linux</b></font><p>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<UL>
<LI><A HREF="#Heading1">- 50 -</A>
<UL>
<LI><A HREF="#Heading2">Setting Up a Gopher Service</A>
<LI><A HREF="#Heading3
<UL>
<LI><A HREF="#Heading4">Gopher and Linux</A>
<LI><A HREF="#Heading5">Configuring Gopher</A>
<UL>
<LI><A HREF="#Heading6">The gopherd.conf File</A>
<LI><A HREF="#Heading7">The gopherdlocal.conf File</A>
<LI><A HREF="#Heading8">Setting Up the Makefile</A>
<LI><A HREF="#Heading9">WAIS and Gopher</A>
</UL>
<LI><A HREF="#Heading10">Setting Up Your Gopher Directories</A>
<LI><A HREF="#Heading11">Starting Gopher</A>
<LI><A HREF="#Heading12">Letting the World Know</A>
<LI><A HREF="#Heading13">Summary</A>
</UL>
</UL>
</UL>
<P>
<HR SIZE="4">
<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 50 -</FONT></H2>
<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">Setting Up a Gopher
Service</FONT></H2>
<H2 ALIGN="CENTER"><FONT COLOR="#000077"></FONT></H2>
<P><I>by Tim Parker</I></P>
<P>IN THIS CHAPTER</P>
<UL>
<LI>Gopher and Linux
<P>
<LI>Configuring Gopher
<P>
<LI>Setting Up Your Gopher Directories
<P>
<LI>Starting Gopher
<P>
<LI>Letting the World Know
</UL>
<P>Gopher is one of the most useful Internet services available, because it is widely
used by beginners and veterans alike. Gopher is a text-based file location system
that leads you through a series of hierarchical menus to find specific files you
want. Setting up a Gopher site is really just a matter of configuring the Gopher
server software and creating a number of logical directory structures with files
indexed in a Gopher format.</P>
<P>Gopher works by having a client program (started by a user) connect to a Gopher
server and retrieve information about files available on the Internet (or local area
network, if the Gopher server is limited to that area). At the end of 1995, there
were more than 6,000 Gopher servers on the Internet, all accessible by anyone with
a Gopher client. Those servers contain information about more than 10 million items,
ranging from text files to movies, sounds, images, and many types of application
binaries. Gopher enables you to display and manipulate lists of files, looking for
items of interest to you.</P>
<P>If you or the users of your Linux system want to connect to another Gopher server,
you need a Gopher client. There are several clients available with Linux distributions,
on FTP and BBS sites, and through several other sources. If you don't want to allow
users (or yourself) to start a Gopher client, you can use telnet to connect to sites
known as public Gopher clients. These sites allow you to log in as an anonymous user
and access the Gopher system. Most Gopher client packages offer more than just Gopher
programs. Typical Gopher clients enable you to access WAIS indexes, use FTP, and
to some extent, interwork with the World Wide Web.</P>
<P>This chapter looks at how you can set up a Gopher server, allowing others to access
your machine's Gopher listings. Although we won't go into detail about how you should
structure your Gopher service, you will see how to configure your software.
<H3 ALIGN="CENTER"><A NAME="Heading4<FONT COLOR="#000077">Gopher and Linux</FONT></H3>
<P>There are currently two versions of Gopher available for Linux systems: Gopher
and Gopher+ (Gopher Plus). Gopher is freely available, but Gopher+ is a commercial
product. The difference between the two is functionality. If the additional capabilities
of Gopher+ are important to you and your Gopher site, you may want to consider purchasing
the product. Essentially, Gopher+ adds the following features:
<UL>
<LI>Makes extended file information available
<P>
<LI>Offers a description of a file
<P>
<LI>Can retrieve multiple versions of a file at one time (such as ASCII and PostScript
simultaneously)
<P>
<LI>Allows file retrieval based on search criteria determined by the user
</UL>
<P>Gopher+ works with Gopher, but Gopher cannot use the advanced features of Gopher+.
Gopher+ and Gopher both work with WWW browsers. Gopher+ licenses tend to cost about
$100 or $500, depending on the site's conditions.</P>
<P>The versions of Gopher usually offered with Linux come from one of two sources:
University of Minnesota Gopher and Gopher+, or GN Public License Gopher. The most
recent public version of UM Gopher is version 1.3 (version 2.13 is free only to educational
institutions), but the university is no longer working on the freeware Gopher product,
instead concentrating on the commercial Gopher+ product. The GN Public License Gopher
includes a WWW service but does not provide full functionality at present.</P>
<P>Gopher uses a TCP/IP family protocol known, surprisingly enough, as the Gopher
protocol. This is a fairly simple request-answer protocol that is implemented for
speed. When Gopher transfers information about a file it knows about (called a Gopher
menu file), it follows a set format. This is the format used by Gopher:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF"><type><display_name><selector string><hostname><port>
</FONT></PRE>
<P>The fields in the Gopher menu file have the following meanings:
<UL>
<LI>type--A one character description of the item (see the following bulleted list
for valid codes).
<P>
<LI>display_name--The menu or display name, followed by a tab character.
<LI>n selector_string--A unique identifier for a document on each server (usually
based on the filename). The selector string is followed by a tab character.
<P>
<LI>hostname--The host where the file resides, followed by a tab character.
<P>
<LI>port--The port to access the host, followed by a carriage return/line feed pair
(usually port 70).
</UL>
<P>The Gopher+ version of the system adds a few new attributes to each line, including
the name of the system administrator responsible for the service, a simple description
of the document type (text, for example), the language the file is written in, the
last date the file was updated, and the size in bytes.</P>
<P>When a user wants to retrieve a file through the Gopher system, the hostname and
port are used to create the connection to the remote server, while the selector string
can be used to identify the file to be downloaded.</P>
<P>There are several types of files supported by Gopher, all given a unique one-character
type code. The following is a list of valid codes:
<UL>
<LI><TT>0</TT> Plain text file
<P>
<LI><TT><BR>
</TT> Directory
<P>
<LI><TT><BR>
</TT> CSO phonebook server (the hostname is the machine to connect to, and the selector
string is blank)
<P>
<LI><TT><BR>
</TT> Error
<P>
<LI><TT><BR>
</TT> BinHex Macintosh file
<P>
<LI><TT><BR>
</TT> Binary DOS archive file
<P>
<LI><TT><BR>
</TT> UNIX uuencoded file
<P>
<LI><TT><BR>
</TT> Index-search server
<P>
<LI><TT><BR>
</TT> Pointer to text-based telnet session (the hostname is the machine to connect
to, and the selector string is the name to log in as)
<P>
<LI><TT><BR>
9</TT>Binary file
<P>
<LI><TT><BR>
</TT> GIF file
<P>
<LI><TT><BR>
</TT> HTML document
<P>
<LI><TT><BR>
</TT> Graphic image
<P>
<LI><TT><BR>
</TT> Unselectable inline text
<P>
<LI><TT><BR>
</TT> MIME-encapsulated mail document
<P>
<LI><TT><BR>
</TT> Adobe PDF file
<P>
<LI><TT><BR>
</TT> Sound
<P>
<LI><TT><BR>
</TT> Pointer to 3270 telnet session (the hostname is the machine to connect to,
and the selector string is the login name)
</UL>
<P>The Gopher system uses a number of other files on a Linux system, all of which
must exist. The files necessary for Gopher are as listed here:
<UL>
<LI><TT>tn3270</TT> or similar 3270 emulator--Used for telnet 3270 connections.
<P>
<LI><TT>kermit</TT> or <TT>zmodem</TT> communications programs--Used for downloading
files. The binaries are usually called <TT>kermit</TT>, <TT>sz</TT>, <TT>sb</TT>,
and <TT>sx</TT>.
<P>
<LI>graphics utility--If you allow the display of graphics, you need a graphics utility
such as <TT>xv</TT>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -