grase (at) cse.ucsc.edu
There are many web servers. Suppose you have one web server which has millions of documents. How would you find find particular documents whose author is Jim and which contain a key word such as java. A Catacomb is a perfect solution for that.
The Web-DAV protocol is an extension of HTTP and it enables the user to write to the HTTP server, give properties for resources and other functions. DASL is extension of Web-DAV and it enables the user to search resources in the Web server. Catacomb is a DASL implementation for Apache and mod_dav.
This document explains how to install the Catacomb module and use it.
Copyright (c) 2002, The Regents of the University of California. The Regents of the University of California MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. The Regents of the University of California SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
Briefly, it is :
To implement the search function, Catacomb uses MySQL. That means if you are saving some resources using PUT or MKCOL which are Web-DAV methods, all of the resources and their information are saved in not a file system, but in DBMS.
You need :
We assume that your MySQL is installed in the /usr/local directory.
Enjoy DASLed Apache server!
<shell> tar xvfz httpd-2.0.36.tar.gz <shell> cd http-2.0.36 <shell> ./configure --enable-dav --enable-so <shell> make; make install <shell> cd .. <shell> tar xvfz catacomb-x.x.x.tar.gz <shell> cd catacomb-x.x.x <shell> ./configure --with-apache=/usr/local/apache2 --with-mysql=/usr/local <shell> make; make install <shell> add this in /usr/local/apache2/conf/httpd.conf ___________________________________________________________ |# This is server configure now | |DavDBMSHost localhost | |DavDBMSDbName repos | |DavDBMSId root | |DavDBMSPass root | |DavDBMSTmpDir /tmp/ | | | |<Location /repos> | |DAV repos | |<//Location> | ----------------------------------------------------------- <shell> mysqladmin create repos <shell> mysql repos < table.sql <shell> mysql repos < data.sql <shell> /usr/local/apache2/bin/apachectl start
You need MySQL, and you can download it from the MySQL Web Site. I assume that MySQL is already installed on your machine. There is no special MySQL option for mod_dav_dasl, so you don't need to reinstall MySQL for Catacomb, if MySQL is already installed. If you have some difficulties to install MySQL, please visit the MySQL homepage. The default MySQL installation directory is /usr/local.
You need Apache 2.0.36 or later version for Catacomb. You can download the latest Apache server from the Apache Web Site. When you install Apache, we need two options, --enable-dav and --enable-so. Catacomb is a mod_dav interface, so we need to enable mod_dav. The Catacomb object is a shared style object, so your Apache must support shared objects. The default Apache installation directory is /usr/local/apache2. You can enable two option by configuring with this command:
<shell> ./configure --enable-dav --enable-so
Now, it is time to install Catacomb. You can download the latest version from the Catacomb project Web Site. Untar the source. When you configure the Catacomb, you need to select two options, --with-apache and --with-mysql. Using --with-mysql option, you need to specify the mysql C client library directory, and using --with-apache, you will specify the apache directory. The default directory is the /usr/local directory for MySQL and the /usr/local/apach2 directory for Apache.
After finishing the configuration, you can do make and make install.
We need two configurations such as:
You want to add these lines into the /usr/local/apache2/conf/httpd.conf file.
Here are the directive explanations:
___________________________________________________________ |# This is server configure now | |DavDBMSHost localhost | |DavDBMSDbName repos | |DavDBMSId root | |DavDBMSPass root | |DavDBMSTmpDir /tmp/ | | | |<Location /repos> | |DAV repos | |<//Location> | -----------------------------------------------------------
Second configuration job is creating DB and tables for mod_dav_dasl. DB which is already exist for other usage is reusable for Catacomb, but creating a new DB for Catacomb is strongly recommend. You can create new DB using the mysqladmin command:
This command will create DB named repos. There are several tables used by Catacomb. You can create tables by importing table.sql in the Catacomb source directory using this command:
<shell>mysqladmin create repos
You might need -u and -p options for MySQL, if you specified a database user for the DB. Finally, you need to import data for your root information of the Catacomb enabled directory. In our example, the directory name is /repos. If you specified different directory name, you need to edit data.sql in the Catacomb source directory. Also, if you have more than two directory directives for Catacomb, you need to import data.sql several times with different directory data. This is the example of data.sql.
<shell>mysql repos < table.sql
Make sure the third arguments in the example (/repos) is same as your Location in httpd.conf. You want to import the data.sql using this command:
INSERT INTO dasl_resource VALUES (1,'','/repos',651165539,'(null)','(null)',0,'httpd/unix-directory', '(null)',1014759103979654,'(null)',1,0,'(null)',1,2,NULL,'1234567890');
<shell>mysql repos < data.sql
If you want to test your DASLed server very quickly, the simplest and best way is using telnet. Do telnet to your server and the port. Let's suppose our DASLed server is ocean.cse.ucsc.edu and port is 7777. We can test by typing the OPTION method:
If you can see SEARCH method in Allow field in the response, your DASLed server is working properly.
ocean 10> telnet ocean.cse.ucsc.edu 7777 Trying 220.127.116.11... Connected to ocean.cse.ucsc.edu. Escape character is '^]'. OPTIONS /dasl/ HTTP/1.1 Host: ocean.cse.ucsc.edu HTTP/1.1 200 OK Date: Wed, 08 May 2002 09:16:13 GMT Server: Apache/2.0.36-dev (Unix) DAV/2 DASL/0.1 DAV: 1 DAV: <http://apache.org/dav/propset/fs/1> MS-Author-Via: DAV Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,SEARCH DASL: <DAV:basicsearch> Content-Length: 0 Content-Type: text/plain; charset=ISO-8859-1
Unfortunately, you can not copy resources or make directory directly like usual Apache file system directories, since Catacomb use MySQL to save all resources and their data. So you need to use Web-DAV client to read/write your resources in the DASLed server. There are many WebDAV client programs. You can use one of these client and read/write your resources. If you want to only read your resources, a web browser are a good tool. For more information about WebDAV software, visit the WebDAV resource site.
So far, there is not many DASL clients. When we write this HOWTO, cadaver DASL patch is on developing. The cadaver client will support DASL, when you read this HOWTO. Hopefully there will be lots of DASL clients very soon.
If your DASLed server doesn't work properly, reading error_log in the Apache's log directory is good idea. Here are simple check lists:
Catacomb project is just started, so we have lots of thing to do and to improve though. I hope Catacomb and this HOWTO could help your Internet environment.
Catacomb is open source project under Apache License. So anybody is welcome to the project. Please content to catacomb(at)webdav.org, if you have interest.