-->
Previous Table of Contents Next


Starting freeWAIS

As with the FTP services, you can set freeWAIS to start up when the system boots by using the rc files from the command line at any time, or you can have the processes started by inetd when a service request arrives. If you want to start freeWAIS from the command line, you need to specify a number of options. A sample startup command line looks like this:


waisserver -u username -p 210 -l 10 -d /usr/wais/wais_index

The -u option tells waisserver to run as the user username (which has to be a valid user in /etc/passwd, of course), the -p option tells waisserver what port to use (the default is 210, as shown in the /etc/services file), and the -d option shows the default location of WAIS indexes. If you want to invoke logging of sessions to a file, use the -e option followed by the name of the logfile.

You should run waisserver as another user instead of root to prevent holes in the WAIS system from being exploited by a hacker. If the service is run as a standard user (such as wais), only the files that the user would have access to would be in jeopardy.

If the port for waisserver is set to 210, the service corresponds to the Internet standards for access. If you set the value to another port, you can configure the system for local area access only. If the port number is less than 1023, the WAIS service must be started and managed by root, but any port over 1023 can be handled by a normal user. If you intend to use port 210, you don’t have to specify the number in the command line, although the -p option still must be used.

If you want to let inetd handle the waisserver startup, you need to ensure the file /etc/services has an entry for WAIS. The line in the /etc/services file looks like this, where 210 is the port number WAIS uses, and tcp is the protocol:


z3955  210/tcp  #WAIS

After modifying or verifying the entry in /etc/services, you need to add a WAIS entry to the inetd.conf file to start up waisserver whenever a request is received on port 210 (or whatever other port you are using). The entry looks like this, where the options are the same as for the command line startup mentioned above:


z3955  stream  tcp  nowait  root/usr/local/bin/waisserver/waisserver.d

-u username -d /usr/wais/wais_index

The daemon waisserver.d is used when starting up in inetd mode, instead of waisserver. Again you can use the -e option to log activity to a file.

Building Your WAIS Indexes

After you have the freeWAIS server ready to run and everything seems to be working, it’s time to provide some content for your WAIS system. Usually, documents are the primary source of information for WAIS, although you can index any type of file. The key step to providing WAIS service is to build the WAIS index using the waisindex command. The waisindex command can be a bit obtuse at times, but a little practice and some trial-and-error fiddling will help you master its somewhat awkward behavior.

The waisindex program works by examining all the data in the files of which you want to create an index. From its examination, waisindex usually generates seven different index files (depending on the content and your commands). Each file holds a list of unique words in the documents. The different index files are then combined into one large database, often called the “source” (or “WAIS source”). Whenever a client WAIS package submits a search, the search strings are compared to the source, and the results displayed with accuracy analysis (the match score).


Tip:  
The use of waisindex enables a client search to proceed much more quickly because the keywords in the data files have already been extracted. However, the mass of data in the index files can be sizable, so allow plenty of disk space for a WAIS server to work with. (For a typical WAIS site, assume at least double the amount of room needed for the source files.)


Previous Table of Contents Next