Installation and Configuration


Installing Webglimpse 2.X or 3.X Using the Unix/Linux Shell

The list below are the steps required to install Webglimpse using the unix/linux shell. The installation steps must be completed in the following order:

Download Glimpse & Extract the files
Configure & Install Glimpse
Download Webglimpse & Extract the files
Install Webglimpse
Configure Your archive


Step 1 - Download Glimpse and Extract the Files

*Important Note About Upgrading: Users upgrading an existing installation can follow the same steps as outlined below. The only difference will be that when running ./wginstall, you will have the option to keep existing configuration and a lot less questions will be asked. The only thing to watch out for, is that files in /usr/local/wg2/templates and /usr/local/wg2/dist will be replaced with newer versions, so if you had customized your copies, you will need to make backups before upgrading. Individual archive files will only be replaced if you press the 'Save Changes' button for that archive in the archive manager program (http://yourserver/cgi-bin/wg2/wgarcmin.cgi).

All users may download Glimpse from Glimpse is 'honor system' or shareware distribution, no password is required for download. See the Licensing page for more information.

Extracting the Glimpse Files

Create a temporary directory to place the tarball, then execute the following command to untar and extract the files:

tar -xzvf glimpse-latest.tar.gz

Step 2 - Configure & Install Glimpse

While still in your temporary directory, execute the following command:

cd glimpse-[VERSION]
make install

Note: *If you are running as a non-root user, you may need to copy the files by hand to another location.
By default the above steps will install glimpse binaries to /usr/local/bin.

To copy the binaries to another location, try the following

mkdir ~/glimpsebins
cp bin/* ~/glimpsebins

Then, type

ls -slagd ~/glimpsebins

and note the full path. You'll need to give this full path to Webglimpse to tell it the location of the glimpse binaries. Make sure NOT to tell Webglimpse a path including the '~' character, because that refers to 'your home directory' and it most likely will not be available when running through a web browser.

Download Webglimpse and Extract the Files

Depending on your license (commercial, EDU-only, or trial), you may need to use a different link for download. See Downloads page for all current download links.

Extracting the Webglimpse Files

Create a temporary directory to place the tarball, then execute the following command to untar and extract the files:

tar -xzvf wg-latest.tar.gz

ls -l

cd wg-[VERSION]

Install Webglimpse

While still in your temporary directory, execute the following command:


This program will check the operating system and the location of several required programs, including glimpse, glimpseindex and wgconvert. If these are not found in the path, you will be prompted for their locations. Both glimpse and wgconvert should have been installed with the Glimpse package.

You will be asked a series of questions about your server configuration. For most questions you can accept the default, especially if wginstall is successful in parsing your httpd.conf file. Experienced users can probably just run wginstall without reading the example below.

The install process will vary somewhat depending on your choices, but it will be something like the following:

First, I'll need a Webglimpse home directory, where most of the libraries and executables will be stored. This directory should be readable by the user the web server runs as, but for greatest security should NOT be under document root or the cgi-bin area.
Please enter Webglimpse home directory [/usr/local/wg2]:

Should NOT be the current directory. Make sure it is an absolute path, ie starts with a "/", not a "."

Please enter the path to the web server configuration file that contains your ServerName, DocRoot and VirtualHost settings For apache servers, this file is usually named httpd.conf.
Path to configuration file [/etc/httpd/conf/httpd.conf]:

The installation program will attempt to parse some server configuration settings out of this file. You will have a chance to override them. In no case are any changes made to your httpd.conf file, this is a read-only process!

Parsed the following settings from the server config file:
        ServerName = localhost
        DocumentRoot = /home/WWW
 plus others.  All these settings can be edited from the web administration tool
 after the install has completed.
 Please enter 'Y' to keep these settings for later editing
 or 'N' to forget all parsed values and reenter them now
Keep parsed values from server config? [Y]:

If you enter N, you will be able to reenter these settings now. If you enter Y or just hit return, you won't be prompted for them now, but you can later edit the file wgsites.conf in the archives directory (set below) to change or add values.

Next, I'll need a directory for storing indexes and other archive-related files. To use the web administration interface, this directory will need to be made writable by the web user. It should NOT be placed under document root or the cgi-bin area.
Please enter Webglimpse Archive directory [/usr/local/wgnew1/archives]:

In versions 1.X, archives were stored all over the place, often along with the files being indexed. With all 2.X versions, we default to keeping all archive files in one place, but you still will have the option later through the web interface to place each archive wherever you want.

Now, I'll need a directory that IS under your cgi-bin area to place the webglimpse cgi scripts. This should be a directory where scripts can execute from the web.
Please enter full directory path to Webglimpse cgi area [/home/httpd/cgi-bin/]:

This is important; you must have a directory where cgi scripts can run in order to run webglimpse and wgarcmin. In versions 2.0.9 and above, the scripts are called webglimpse.cgi and wgarcmin.cgi so that they will run on servers requiring that extension. If you have a scriptalias cgi-bin directory, you may want to create a subdirectory specifically for the webglimpse scripts.

What is the script alias (relative url) for this directory? [/cgi-bin/]:

What username does the web server run as? [nobody]:

Searches may be logged to a file in a format usable by web usage analysis software such as wusage by
Do you have wusage installed (and would you like to use it)? [N]:

versions 2.0.9 and above only

What is the path to wusage? [/usr/local/bin/wusage]:

Wusage will generate HTML reports showing the terms users have searched for. These reports generally are placed somewhere in HTML document space, possibly in a password-protected area.
What directory should the reports be stored in? [/home/WWW/wusage]:

Now you need to choose a program to filter tags out of HTML files
If you don't need non-English language support, probably you will pick choice 1
The choices are as follows: 
        1 - html2txt            The fast, simple, original conversion program
        2 -        Slow perl script handles HTML character codes
        3 - htuml2txt           Faster lex script also handles char codes 
        4 - htuml2txtc          Experimental C program to do same as above. (not installed!)
 Please enter your choice [1]:

If your site is in a language other than English, you'll want to use one of the choices 2-4. If you choose 4, go to the /lib subdirectory of your webglimpse home directory, and compile htuml2txt.c by hand.
Something as simple as gcc -o htuml2txtc htuml2txt.c works on most systems.

Should I now make nobody the owner of /usr/local/wgnew1/archives so that you can administer archives from the web? [Y]:

Currently you have to allow this in order to administer your archives in version 2.X. We plan to have a future version that allows administration either from command-line or web interface.

Should I also make nobody the owner of /home/WWW/wusage so that usage reports can be created from the web interface? [Y]:

Now I am going to compile the filter program you chose, and also httpget, a very short C program needed by Webglimpse. Please choose the OS closest to your system. You may want to examine the available Makefiles to see which one would work best. What OS are you running (must be one of linux sco hpux sunos solaris osf irix)? [linux]:

gcc -O -o lib/httpget lib/httpget.c 
gcc -O -o lib/html2txt lib/html2txt.c
make: `htuml2txt' is up to date.
Copying files to /usr/local/wgnew1 and /home/httpd/cgi-bin/

If you have any problems compiling these short programs, take a look at the switches in the Makefile in the main webglimpse home directory, and see if any may need to be changed for your system.

Unless you are already on a secure intranet, you will want to set up some security for the admin interface. The best way is to use your httpd server's built-in security, usually by creating .htaccess and .htpasswd files. Depending on your server configuration, you may need to move the wgarcmin script to a cgi-enabled directory under DocumentRoot. If you are not the sysadmin, you may or may not be able to do this. If in doubt, you can always use cookie-based authentication for now. We encrypt the password combined with a timestamp so it is not that bad.

Set up cookie-based authentication? [Y]:

wgarcmin will automatically check if the user is authenticated by the webserver, and if they match one of the entries in the .wgpasswd file. So even if you say Y to this question, you can later set up authentication through your webserver and cookies will automatically be turned off. If you say N, you will need to set up your own authentication independently, it will not be done by the install.

Enter administrative username []:admin

One of the few questions you actually have to type something no matter what, since there is no default

Enter administrative password []:

Done with install! You may use /usr/local/bin/wgcmd
to configure archives.

Run wgcmd to manage your archives now? [Y]:

At this point, all the webglimpse-related files are copied to your webglimpse home directory, with appropriate changes made for your system, and the scripts are in the cgi-bin directory you specified. When you create each archive, some files are copied again into each archive directory, so they can be customized for that archive.

You can answer 'Y' to the last question, and the archive manager will be started automatically.

Congratulations, you have successfully installed Webglimpse! You are now ready to configure your first archive.

Configure Your Archive

Both wgcmd (command line) and wgarcmin.cgi (web interface) have context-sensitive help and instructions. Start by running either one, as prompted at the end of the install. If running wgcmd, type '?' for help. If running wgarcmin.cgi through your browser, look for the 'Help on...' link at the top of each page.

The section Making A Searchable Site contains more information and detailed steps for making your archives.

Next, we will talk about installing Webglimpse into a cPanel server.

Continue to Next Page >>