SWISH 1.2.1
Installation
[Index] [Previous Chapter] [Next Chapter] Obtaining SWISH
First, you need to grab the source code and related files athttp://www.rru.com/~meo/useful/www.html#swish
. It's available there in both compress'd (tar.Z) and gzip'd (tar.gz) formats. Here's what to do:
- Download the SWISH package (
swish-1.2.1.tar.Z
orswish-1.2.1.tar.gz
)- Change to the directory you want to unpack it in.
- Uncompress and untar it
zcat < swish-1.2.1.tar.Z | tar xf -orgunzip < swish-1.2.1.tar.gz | tar xf -Building SWISH
- Go into the
swish/
directory.- Edit the following files:
The variables which you can change are defined in each file, with complete descriptions. The top level Makefile variables are all directories where various parts of the package will go when installed. The
- Makefile
- src/config.h
- src/Makefile
src/config.h
file contains basic configuration parameters defining how SWISH works at your installation. Nearly all of these may be overriden in configuration files, and many may be overridden on the command line. See the Configuration Guide for details. Thesrc/Makefile
variables are primarily concerned with compiling and linking.- Compile the code.
make all- After compiling, run the basic test provided.
make testThe test output should look like this:Checking file "test.html"... test.html (42 words) Removing very common words... no words removed. Writing main index... 26 unique words indexed. Writing file index... 1 file indexed. Running time: Less than a second. Indexing done! # SWISH format 1.1 search words: test # Name: (no name) # Saved as: index.swish # Counts: 26 words, 1 files # Indexed on: 04/08/98 22:14:08 CDT # Description: (no description) # Pointer: (no pointer) # Maintained by: (no maintainer) 1000 test.html "If you are seeing this, the test was successful!" 358 .- If you want to play around with swish a bit, use the Test/sample.swish index. The Users Guide provides details on searching with swish.
Installing SWISH
Now install the source, and optionally the docs and maintenance scripts:make install make install-docs make install-scripts make install-iconsThe icons are used by both the docs and the scripts.Swish can be installed anywhere you like, but if you intend to use it with the World Wide Web, you should probably install it in your server's
cgi-bin/
directory.You probably want to put swish's configuration files in your web server's
ServerRoot/conf/
directory. To do this, look in the Conf/ directory, and pick a sample configuration file to copy. The samples include:You might also want to create a directory to hold SWISH databases, somewhere like
- meo.conf - sample personal index setup, for server where personal web files are located in ~login/public_html, where login is any user's login name
- rru.conf - sample company index setup based on a bogus virtual company at a well-known web site
- sample.conf - sample index for any given directory. This is the file used to create Test/sample.swish .
DocRoot/swish/indexes/
, or you may wish to keep each index in the directory being indexed (unless it's indexing directories in separate hierarchies). You can store the files anywhere you like, as long as you remember where they are! They don't have to be in a location the web server can access, so long as the swish program can access them.At this point you should probably proceed to the Configuration Guide. If you prefer to play with swish first you should read the Users Guide now.
Porting SWISH
Porting to other versions of UNIX and similar operating systems is usually just a matter of recompiling, not porting. But if you do port to another platform (or even successfully build and use SWISH on another platform) please forward the changes or info to meo@rru.com .Ports to platforms with different file I/O interfaces than the standard UNIX interface may require some extra work, but should be limited pretty much to file system specific issues.
[Index] [Previous Chapter] [Next Chapter]
Last update: 18/Aug/1998