You are on page 1of 6

This is a brief explanation about Cata

omb. This explains what is Cata-


omb, howto install it and how to use it. The enables the SEARCH method
whi h is spe ied in the DASL proto ol. The Cata omb is a module for
Apa he <http://httpd.apa he.org> and repository interfa e of mod_dav
<http://www.webdav.org/mod_dav>.

HOWTO Use Cata omb with Apa he


GRASE Lab at UCSC grase (at) se.u s .edu 0.01, 2002-8-30

Contents

1 Introdu tion 1

1.1 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 What is Cata omb? 1

3 Installation 2

3.1 What do I need? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2


3.2 Qui k Tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.4 Conguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.5 Fire your Apa he. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4 DASL Clients 5

4.1 Read/Write resour es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


4.2 Sear h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

5 Trouble shooting. 5

6 Con lusion 6

6.1 Call for parti ipation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1 Introdu tion

There are many web servers. Suppose you have one web server whi h has millions of do uments. How would
you nd nd parti ular do uments whose author is Jim and whi h ontain a key word su h as java . A
Cata omb is a perfe t solution for that.
The Web-DAV proto ol is an extension of HTTP and it enables the user to write to the HTTP server, give
properties for resour es and other fun tions. DASL is extension of Web-DAV and it enables the user to
sear h resour es in the Web server. Cata omb is a DASL implementation for Apa he and mod_dav.
This do ument explains how to install the Cata omb module and use it.
3. Installation 2

DASL spe ies the SEARCH method for sear hing and lo ating resour es. In other words, it enables the
user to sear h resour es in the web server using the DASL proto ol. Cata omb is the implementation of
DASL whi h allows web server to support a sear h fun tion.
To implement the sear h fun tion, Cata omb uses MySQL. That means if you are saving some resour es
using PUT or MKCOL whi h are Web-DAV methods, all of the resour es and their information are saved
in not a le system, but in DBMS.

3 Installation

3.1 What do I need?


You need :

 Linux or Unix system whi h an be installed Apa he.

 Apa he 2.0.36 or higher version.

 MySQL 3.2.33 or higher version.

 mod_dav_respo latest version.

3.2 Qui k Tour


We assume that your MySQL is installed in the /usr/lo al dire tory.

<shell> tar xvfz httpd-2.0.36.tar.gz


<shell> d http-2.0.36
<shell> ./ onfigure --enable-dav --enable-so
<shell> make; make install
<shell> d ..
<shell> tar xvfz ata omb-x.x.x.tar.gz
<shell> d ata omb-x.x.x
<shell> ./ onfigure --with-apa he=/usr/lo al/apa he2 --with-mysql=/usr/lo al
<shell> make; make install
<shell> add this in /usr/lo al/apa he2/ onf/httpd. onf
___________________________________________________________
|# This is server onfigure now |
|DavDBMSHost lo alhost |
|DavDBMSDbName repos |
|DavDBMSId root |
|DavDBMSPass root |
|DavDBMSTmpDir /tmp/ |
| |
|<Lo ation /repos> |
|DAV repos |
|<//Lo ation> |
-----------------------------------------------------------
3. Installation 3

<shell> mysqladmin reate repos


<shell> mysql repos < table.sql
<shell> mysql repos < data.sql
<shell> /usr/lo al/apa he2/bin/apa he tl start

Enjoy DASLed Apa he server!

3.3 Installation
You need MySQL, and you an download it from the MySQL Web Site <http://www.mysql.org>. I assume
that MySQL is already installed on your ma hine. There is no spe ial MySQL option for mod_dav_dasl,
so you don't need to reinstall MySQL for Cata omb, if MySQL is already installed. If you have some
di ulties to install MySQL, please visit the MySQL homepage. The default MySQL installation dire tory
is /usr/lo al.
You need Apa he 2.0.36 or later version for Cata omb. You an download the latest Apa he server from the
Apa he Web Site <http://www.apa he.org>. When you install Apa he, we need two options, enable-dav
and enable-so. Cata omb is a mod_dav interfa e, so we need to enable mod_dav. The Cata omb obje t is
a shared style obje t, so your Apa he must support shared obje ts. The default Apa he installation dire tory
is /usr/lo al/apa he2. You an enable two option by onguring with this ommand:

<shell> ./ onfigure --enable-dav --enable-so

Now, it is time to install Cata omb. You an download the latest version from the Cata omb proje t Web
Site <http://www.webdav.org/ ata omb>. Untar the sour e. When you ongure the Cata omb, you need
to sele t two options, with-apa he and with-mysql. Using with-mysql option, you need to spe ify the
mysql C lient library dire tory, and using with-apa he, you will spe ify the apa he dire tory. The default
dire tory is the /usr/lo al dire tory for MySQL and the /usr/lo al/apa h2 dire tory for Apa he.
After nishing the onguration, you an do make and make install.

3.4 Conguration
We need two ongurations su h as:

 Apa he onguration.

 DBMS initialization.

You want to add these lines into the /usr/lo al/apa he2/ onf/httpd. onf le.

___________________________________________________________
|# This is server onfigure now |
|DavDBMSHost lo alhost |
|DavDBMSDbName repos |
|DavDBMSId root |
|DavDBMSPass root |
|DavDBMSTmpDir /tmp/ |
| |
3. Installation 4

|<Lo ation /repos> |


|DAV repos |
|<//Lo ation> |
-----------------------------------------------------------

Here are the dire tive explanations:

 DavDBMSHost: spe ify your MySQL server.

 DavDBMSDbName: Your DB name. To make new DB for Cata omb is re ommended.

 DavDBMSId: User id for the DB. Make sure the user has proper permission for the DB.

 DavDBMSPass: User password for the id. If your id doesn't have a password, just omit DavDBMSPass
dire tive.

 DavDBMSTmpDir: Cata omb needs a temporary dire tory to manipulate the les. Make sure your
HTTP daemon has writing permission in the dire tory.

 Lo ation spe ies the URI information. You need to spe ify DAV provider as "repos".

Se ond onguration job is reating DB and tables for mod_dav_dasl. DB whi h is already exist for other
usage is reusable for Cata omb, but reating a new DB for Cata omb is strongly re ommend. You an reate
new DB using the mysqladmin ommand:

<shell>mysqladmin reate repos

This ommand will reate DB named repos. There are several tables used by Cata omb. You an reate
tables by importing table.sql in the Cata omb sour e dire tory using this ommand:

<shell>mysql repos < table.sql

You might need -u and -p options for MySQL, if you spe ied a database user for the DB. Finally, you need
to import data for your root information of the Cata omb enabled dire tory. In our example, the dire tory
name is /repos. If you spe ied dierent dire tory name, you need to edit data.sql in the Cata omb sour e
dire tory. Also, if you have more than two dire tory dire tives for Cata omb, you need to import data.sql
several times with dierent dire tory data. This is the example of data.sql.

INSERT INTO dasl_resour e VALUES


(1,'','/repos',651165539,'(null)','(null)',0,'httpd/unix-dire tory',
'(null)',1014759103979654,'(null)',1,0,'(null)',1,2,NULL,'1234567890');

Make sure the third arguments in the example (/repos) is same as your Lo ation in httpd. onf. You want
to import the data.sql using this ommand:

<shell>mysql repos < data.sql

3.5 Fire your Apa he.


<shell>/usr/lo al/apa he2/bin/apa he tl start
4. DASL Clients 5

4 DASL Clients

If you want to test your DASLed server very qui kly, the simplest and best way is using telnet. Do telnet to
your server and the port. Let's suppose our DASLed server is o ean. se.u s .edu and port is 7777. We an
test by typing the OPTION method:

o ean 10> telnet o ean. se.u s .edu 7777


Trying 128.114.51.104...
Conne ted to o ean. se.u s .edu.
Es ape hara ter is '^℄'.
OPTIONS /dasl/ HTTP/1.1
Host: o ean. se.u s .edu

HTTP/1.1 200 OK
Date: Wed, 08 May 2002 09:16:13 GMT
Server: Apa he/2.0.36-dev (Unix) DAV/2 DASL/0.1
DAV: 1
DAV: <http://apa he.org/dav/propset/fs/1>
MS-Author-Via: DAV
Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,SEARCH
DASL: <DAV:basi sear h>
Content-Length: 0
Content-Type: text/plain; harset=ISO-8859-1

If you an see SEARCH method in Allow eld in the response, your DASLed server is working properly.

4.1 Read/Write resour es


Unfortunately, you an not opy resour es or make dire tory dire tly like usual Apa he le system dire tories,
sin e Cata omb use MySQL to save all resour es and their data. So you need to use Web-DAV lient to
read/write your resour es in the DASLed server. There are many WebDAV lient programs. You an
use one of these lient and read/write your resour es. If you want to only read your resour es, a web
browser are a good tool. For more information about WebDAV software, visit the WebDAV resour e site
<http://www.webdav.org/>.

4.2 Sear h
So far, there is not many DASL lients. When we write this HOWTO, adaver DASL pat h is on developing.
The adaver lient will support DASL, when you read this HOWTO. Hopefully there will be lots of DASL
lients very soon.

5 Trouble shooting.

If your DASLed server doesn't work properly, reading error_log in the Apa he's log dire tory is good idea.
Here are simple he k lists:

 Did you ongure Apa he with enable-so and enable-dav option?


6. Con lusion 6

 MySQL demon is running before Apa he server is running?

 Did you spe ify the right DB information in httpd. onf?

 Temporary dire tory whi h is spe ied httpd. onf is readable and writable?

 ...

6 Con lusion

Cata omb proje t is just started, so we have lots of thing to do and to improve though. I hope Cata omb
and this HOWTO ould help your Internet environment.

6.1 Call for parti ipation


Cata omb is open sour e proje t under Apa he Li ense. So anybody is wel ome to the proje t. Please
ontent to ata omb(at)webdav.org <mailto: ata omb(at)webdav.org>, if you have interest.

You might also like