⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsg44.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 3 页
字号:


<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="lsg45.htm">



















<A NAME="I0"></A>







<H2>Linux System Administrator's Survival Guide lsg44.htm</H2>







<P ALIGN=LEFT>







































<HR ALIGN=CENTER>







<P>







<UL>







<UL>







<UL>







<LI>







<A HREF="#E68E232" >Compiling and Installing freeWAIS</A>







<LI>







<A HREF="#E68E233" >Setting Up freeWAIS</A>







<LI>







<A HREF="#E68E234" >Starting freeWAIS</A>







<LI>







<A HREF="#E68E235" >Building Your WAIS Indexes</A>







<UL>







<LI>







<A HREF="#E69E251" >WAIS Index Files</A>







<LI>







<A HREF="#E69E252" >The waisindex Command</A>







<LI>







<A HREF="#E69E253" >Getting Fancy</A></UL>







<LI>







<A HREF="#E68E236" >Summary</A></UL></UL></UL>







<HR ALIGN=CENTER>







<A NAME="E66E50"></A>







<H1 ALIGN=CENTER>







<CENTER>







<FONT SIZE=6 COLOR="#FF0000"><B>Chapter 44</B></FONT></CENTER></H1>







<BR>







<A NAME="E67E53"></A>







<H2 ALIGN=CENTER>







<CENTER>







<FONT SIZE=6 COLOR="#FF0000"><B>Configuring a WAIS Site</B></FONT></CENTER></H2>







<BR>







<P>WAIS (Wide Area Information Service) is a tool that enables users to search for keywords in a database of documents available on your system and show the results. WAIS was developed by Thinking Machines but spun off to a separate company called WAIS Inc. when it became immensely popular. A free version of WAIS was made available to the Clearinghouse for Networking Information Discovery and Retrieval (CNIDR) as freeWAIS, which is the version most often found on Linux systems.







<BR>







<P>WAIS lets a user enter some keywords or phrases, and then searches a database for those terms. A typical WAIS search screen is shown in Figure 44.1. (This screen is a Windows-based Web browser accessing the primary WAIS server at http://www.wais.com. This server is a good place to look for examples of how you can use WAIS.) This example shows a search for the keyword &quot;hubble&quot; (WAIS usually ignores case). You can enter long and complex or relatively simple search criteria on a WAIS search line. After searching all the database indexes it knows about, WAIS shows its results, as shown in Figure 44.2. This screen shows the search results based on the keywords &quot;hubble&quot; and &quot;magnitude.&quot;







<BR>







<P><B> <A HREF="44lsg01.gif">Figure 44.1.</B>







<BR><B>A search screen from a WAIS site.</A></B>







<BR>







<P><B> <A HREF="44lsg02.gif">Figure 44.2.</B>







<BR><B>After a search has been conducted, WAIS displays the results with a </B><B>score showing how well each document on the system matches the search </B><B>criteria.</A></B>







<BR>







<P>The display generated by WAIS, often displayed in a WWW browser or a WAIS browser as in these figures, gives each match with a score from 0 to 1000 indicating the manner in which the keywords match the index (the higher numbers are better matches). Users can then refine the list, expand it, or examine documents listed. In Figure 44.3, one of the documents listed in the search results is displayed in the WWW browser window. WAIS can handle many file formats, including text and documents, audio, JPEG and GIF files, and binaries.







<BR>







<P><B> <A HREF="44lsg03.gif">Figure 44.3.</B>







<BR><B>Selecting any entry on the WAIS search results screen lets you see the </B><B>document, video, or graphics file, or listen to audio (assuming your </B><B>system can handle multimedia output).</A></B>







<BR>







<P>The Linux version of WAIS is called freeWAIS. This chapter looks at how you can set up a freeWAIS server on your Linux machine. WAIS is a useful tool to provide if you deal with a considerable amount of information you want to make generally available. This information could be product information, details about a hobby, or practically any other type of data. All you have to want to do is make it available to others, either on your local area network or to the Internet as a whole.







<BR>







<P>The freeWAIS package has three parts to it: an indexer, a WAIS service, and a client. The indexer handles database information and generates an index that contains keywords and a table indicating the word's occurrences. The service component does the matching between a user's requests and the indexed files. The client is the user's vehicle to access WAIS and is usually a WAIS or WWW browser. WWW browsers usually have an advantage over WAIS browsers in that the latter cannot display HTML documents.







<BR>







<P>A follow-up backward-compatible WAIS system is currently available in beta version called ZDIST. ZDIST's behavior will be much like freeWAIS, with any changes noted in the documentation. ZDIST adds some new features and is a little smaller and faster than freeWAIS. Because of the unstable beta nature of ZDIST, this chapter concentrates on freeWAIS.







<BR>







<BR>







<A NAME="E68E232"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Compiling and Installing freeWAIS</B></FONT></CENTER></H3>







<BR>







<P>The freeWAIS software is often included in a complete Linux distribution CD-ROM and is readily available from many FTP and BBS sites. Alternatively, you can get it by anonymous FTP from the CNIDR site as ftp.chidr.org. The freeWAIS system resides in the directory /pub/NDIR.tools/freewais/freeWAIS-X.X.tar.Z where X.X is the latest version number. The CNIDR site has many binaries available for different machines, as well as generic source code that can be tailored to many different systems.







<BR>







<P>One of the files in the distribution software, which should be placed in the destination directory, is the Makefile used to create the program. If you are compiling the freeWAIS source yourself, examine the Makefile to ensure that the variables are set correctly. Most are fine by default, pointing to standard Linux utilities. The exceptions that you may have to tweak yourself are as follows:







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







CC







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This variable is the name of the C compiler you use (usually cc or gcc).</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







CURSELIB







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This variable should be set to the current version of the curses library on your system.</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







RESOLVER







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Leave this variable blank unless you are using a namespace resolver, in which case set it to -lresolc.</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







TOP







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This variable specifies the full path to the freeWAIS source directory.</FONT>







</TABLE><P>The CFLAGS options enable you to specify compiler flags when the freeWAIS source is compiled. Many options are supported, all of which are explained in the documentation files that accompany the source. Most of the flag settings can be left as their default values in Linux systems. A few of the specific flags you may want to alter are worth mentioning, though. The most useful are the indexer flags, of which two are potentially useful:







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







-DBIO







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This flag is used to allow indexing on biological symbols and terms. Use it only if your site will deal with biological documents.</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







-DBOOLEANS







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This flag enables you to use Booleans such as AND and NOT. This flag can be handy for extending the power of searches.</FONT>







</TABLE><P>The -DBOOLEANS flag handles logical searches. For example, if you are looking for the keywords green leaf, WAIS by default searches for the words green and leaf separately and judges matches on the two words independently. With the -DBOOLEANS flag set, you can join the two words with AND so that a match has to be with green leaf.







<BR>







<P>A couple of other flags that may be useful for freeWAIS sites deal with the behavior of the system as a whole:







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







-DBIGINDER







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Set this flag when there are many (thousands) of documents to index.</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







-DLITERAL







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This flag allows a literal search for a string, as opposed to using partial hits on the string's component words.</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







-DPARTIALWORD







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







This flag allows searches with asterisks as wildcards (such as &quot;auto*&quot;).</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







-DRELEVANCE_FEEDBACK







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







When this flag is set to ON, it allows clients to use previous search results as search criteria for a new search.</FONT>







</TABLE><P>A number of directories are included in the distribution software, most of which are of obvious intent (bin for binaries, man for man pages, and so on). The directories used by freeWAIS in its default configuration are:







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







bin







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Binaries</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







config.c







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







C source code for configuration</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







doc







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Doc files, help files, and FAQs</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







include







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Header files used by the compiler</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







lib







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Library files</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







man







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Man pages</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







src







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







freeWAIS source code</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







wais-sources







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Directory of Internet servers</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







wais-test







⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -