My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
DocInstallation  
Updated Feb 4, 2010 by mwolf...@gmail.com

Installing Marjory

Installing from a pre-packaged release

So far, there are no pre-packaged releases. Stay tuned.

Installing from Subversion

For the purpose of this tutorial, it is assumed you have access to a Unix/Linux shell. It is also assumed that Apache is used as the webserver and Marjory is installed on a dedicated (virtual) server.

First, go to the directory you want to install Marjory in:

cd /path/to/Marjory/

Now, let's make a checkout of the latest revision of Marjory:

svn checkout http://marjory.googlecode.com/svn/trunk/ ./

Included in the checkout you will see a directory named "document_root". This is where your webserver must point to as, well, the document root. Edit your Apache configuration file to work with Marjory like this:

<VirtualHost *:80>
    ServerName marjory.example.com
    DocumentRoot /path/to/Marjory/document_root/
    <Directory /path/to/Marjory/document_root/>
         AllowOverride all
    </Directory>
    ErrorLog /path/to/Marjory/logs/apache_error.log
</VirtualHost>

Remember to restart your webserver for the changes to take effect.

It is important that the directories "data" and "logs" are writeable by the webserver. To achieve that, simply change the owner of these directories to the user which the webserver runs as (e.g. "www-data", "apache", "httpd" or the likes):

sudo chown www-data:www-data data
sudo chown www-data:www-data logs

If you're logged in as root, you can of course omit the "sudo" command. Now, change to the document_root directory and copy the example file htaccess-dist to its proper name, .htaccess:

cd document_root/
cp htaccess-dist .htaccess

Pick your favourite editor an edit the new .htaccess files, so that all paths point to the Marjory installation path that you have chosen:

RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
php_value include_path ".:/path/to/Marjory/library"
php_flag log_errors 1
php_flag display_errors 0
php_flag display_startup_errors 0
php_value error_reporting -1
php_value error_log "/path/to/Marjory/logs/error.log"
AddCharset utf-8 .html .js .htm .css .php

The one last thing you need is a checkout of the latest Zend Framework. Although Marjory doesn't remotely use each and every package provided by the Zend Framework, it's easiest if you just download the whole thing. Again, this is most easily done with Subversion.

cd ../library/
svn checkout http://framework.zend.com/svn/framework/trunk/library/Zend/

Marjory is almost ready. All that is left to do is to create a default search catalog. Right now you can do this via the provided script "createIndex.php":

cd ../scripts/
php createIndex.php default

If you weren't already working with the same user account your webserver is running under, you'll need to chown the newly-created catalog directory so the webserver can both read from and write to it (substitute the user/group combination apache:apache with what's correct on your system):

chown -R apache:apache ../data/default

Now, point your browser to the address of the webserver you just installed Marjory on and you should see an example search box. As the index is of course pretty much empty, you will first have to add documents. Do so by appending "add" to the index and provide some URLs and/or text to add to the index.

Congratulations, you just got yourself a shiny new webservice for indexing and searching documents :-)

Powered by Google Project Hosting