📄 lsg45.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>
-->
<LINK REL="ToC" HREF="index.htm">
<LINK REL="Index" HREF="htindex.htm">
<LINK REL="Next" HREF="lsg46.htm">
<A NAME="I0"></A>
<H2>Linux System Administrator's Survival Guide lsg45.htm</H2>
<P ALIGN=LEFT>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<UL>
<LI>
<A HREF="#E68E237" >Gopher and Linux</A>
<LI>
<A HREF="#E68E238" >Configuring Gopher</A>
<UL>
<LI>
<A HREF="#E69E254" > The gopherd.conf File</A>
<LI>
<A HREF="#E69E255" >The gopherdlocal.conf File</A>
<LI>
<A HREF="#E69E256" >Setting Up the Makefile</A>
<LI>
<A HREF="#E69E257" >WAIS and Gopher</A></UL>
<LI>
<A HREF="#E68E239" >Setting Up Your Gopher Directories</A>
<UL>
<LI>
<A HREF="#E69E258" >Setting Gopher Filenames</A>
<LI>
<A HREF="#E69E259" >Using a Master File</A>
<LI>
<A HREF="#E69E260" >Using Links</A></UL>
<LI>
<A HREF="#E68E240" >Starting Gopher</A>
<LI>
<A HREF="#E68E241" >Letting the World Know</A>
<LI>
<A HREF="#E68E242" >Summary</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E66E51"></A>
<H1 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>Chapter 45</B></FONT></CENTER></H1>
<BR>
<A NAME="E67E54"></A>
<H2 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>Setting Up a Gopher Service</B></FONT></CENTER></H2>
<BR>
<P>Gopher is one of the most useful Internet services available, and it is widely used by beginner and veteran alike. Gopher is a menu-based file location system, which 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.
<BR>
<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.
<BR>
<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, as well. Typical Gopher clients enable you to access WAIS indexes, use FTP, and to some extent, work with the World Wide Web.
<BR>
<P>This chapter looks at how you can set up a Gopher server, allowing others to access your machine's Gopher listings. Although the chapter won't go into detail about how you should structure your Gopher service, you will see how to configure your software.
<BR>
<BR>
<A NAME="E68E237"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Gopher and Linux</B></FONT></CENTER></H3>
<BR>
<P>Currently two versions of Gopher are 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 Gopher+'s additional capabilities are important to you and your Gopher site, you may want to consider purchasing the product. Essentially, Gopher+ adds the following features:
<BR>
<UL>
<LI>Extended file information
<BR>
<BR>
<LI>File descriptions offered
<BR>
<BR>
<LI>Recovery of multiple versions of a file at one time (such as ASCII and PostScript simultaneously)
<BR>
<BR>
<LI>File retrieval based on search criteria determined by the user
<BR>
<BR>
</UL>
<P>Gopher+ works with Gopher, but Gopher cannot use the advanced features of Gopher+. Gopher+ also works with WWW browsers, while Gopher doesn't always function well in a graphical browser. Gopher+ licenses tend to cost about $100 or $500, depending on the site's conditions.
<BR>
<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 last public version of UM Gopher was version 1.3 (version 2.13 is free only to educational institutions), but the University is no longer working on the freeware Gopher product, concentrating instead on the commercial Gopher+ product. The GN Public License Gopher includes a WWW service, but it does not provide a full functionality at present.
<BR>
<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. The format used by Gopher is:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080"><type><display_name><selector string><hostname><port></FONT></PRE>
<P>The fields in the Gopher menu file have the following meanings:
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
type
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This field is a a one character description of the item (see the next list for valid codes).</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
display_name
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This field is the the menu or display name, followed by a tab character.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
selector_string
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This field is a unique identifier for a document on each server (usually based on the filename). The selector string is followed by a tab character.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
hostname
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This field is the host where the file resides, followed by a tab character.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
port
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This field is the port to access the host, followed by a carriage return/line feed pair (usually port 70).</FONT>
</TABLE><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 was written in, the last date the file was updated, and the size in bytes.
<BR>
<P>When a file is to be retrieved through the Gopher system, the hostname and port are used to create the connection to the remote, while the selector string can be used to identify the file to be downloaded.
<BR>
<P>Several types of files are supported by Gopher, all given a unique one-character type code. Valid codes are:
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
0
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Plain text file</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
1
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Gopher directory</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
2
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
CSO phone-book server (the hostname is the machine to connect to, the selector string is blank)</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
3
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Error</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
4
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
BinHex Macintosh file</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
5
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Binary DOS archive file</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
6
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
UNIX Uuencoded file</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
7
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Index-search server</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
8
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Pointer to text-based Telnet session (hostname is machine name to connect to and selector string is name to log in as)</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
9
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Binary file</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
g
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
GIF file</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
HTML document</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
I
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Graphic image</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
I
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Unselectable inline text</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
M
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
MIME encapsulated mail document</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
P
</FONT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -