Unzip the archive: gunzip hypermail-2.1.8.tar.gz.
Untar the archive: tar xvf hypermail-2.1.8.tar.
Change to the newly created directory: cd hypermail-2.1.8.
the prefix: ./configure --prefix=/home/[username] where [username] is your
username.
6.
Compile the program: make.
7.
Install the program: make install.
8.
You should now be able to run the program and read a simple help text: hy-
permail --help.
Do this exercise to create a browsable archive from a standard mail box file.
1.
Make sure you have installed Apache, and make sure it is running.
2.
Create a new directory under your Apache file system as a place to save
your archive: mkdir ~/apache/htdocs/colldev.
3.
From the extras directory of the CD, copy the supplied mail box file to
the colldev directory: cp colldev.mbox ~/apache/htdocs/colldev.
4.
Create a browsable index of the mail box with the following (long) com-
mand: hypermail -d ~/apache/htdocs/colldev -m
~/apache/htdocs/colldev/colldev.mbox -M.
5.
Change directories to and list the items in the newly create directory.
You should see bunches o' files as well as an index.html file: cd
~/apache/htdocs/colldev/; ls.
6.
Finally, view the fruits of your labors in your Web browser:
http://127.0.0.1:8080/colldev/.
If you have previously installed swish-e, then you can do this exercise where
you will create a searchable index of your browsable archive.
1.
Install swish-e.
2.
Copy from the extras directory of the CD a swish-e configuration file to
the colldev directory: cp swish-colldev.cfg ~/apache/htdocs/colldev.
3.
Take a quickie look at the file. It contains extra instructions for the
indexer (swish-e): more swish-colldev.cfg
4.
Create an index: swishe-e -c ./swish-colldev.cfg -i /
home/[username]/apache/htdocs/colldev/0*.html where [username] is your
username.
5.
You should now be able to search the index with simple swish-e commands:
swish-e -w books.
6.
Install a CGI script from the extras directory allowing you to search the
index: cp swish-colldev.cgi ~/apache/cgi-bin.
7.
Edit the script making sure its very first line points to your Perl bi-
nary: pico ~/apache/cgi-bin/swish-colldev.cgi. The very first line should
look something like this: #!/home/[username]/bin/perl where [username] is
your username.
8.
Edit the line in the script that defines where the index resides. The line
should read something like this: my $index = '/
home/[username]/apache/htdocs/colldv/index.swish-e'; where [username] is
Chapter 6. Hands-on activities
35
your username.
9.
Make the script executable: chmod +x swish-colldev.cgi.
10. 1Finally, give the script a whirl:
http://127.0.0.1/cgi-bin/swish-colldev.cgi. Because Hypermail created
structured data with meta tags, and because swish-e was configured to ex-
tract the meta tags and save them to specific fields, it is possible to do
field searching against this email archive using queries like "subject =
book".
Do'stlaringiz bilan baham: