Documentation

Chestnut FTP Search

Installation

First ensure that you have installed all dependences that listed in System Requirements.

Create Database

Create database with your preferred charset. For PostgreSQL this is something like:

# su -c psql postgres
postgres=# CREATE DATABASE your_db_name WITH ENCODING 'utf8';
postgres=# CREATE ROLE your_user WITH PASSWORD 'your_password' LOGIN;
postgres=# GRANT ALL PRIVILEGES ON DATABASE your_db_name TO your_user;

Note that your database encoding must match your database cluster locale encoding, otherwise case insensitive functions will not work correctly.

For MySQL this is something like:

$ mysql -u root
mysql> CREATE DATABASE your_db_name CHARACTER SET cp1251 COLLATE cp1251_general_cs;
mysql> GRANT ALL PRIVILEGES ON your_db_name.* TO 'your_user'@'localhost'
IDENTIFIED BY 'your_password';

Note that we not recommend to use multibyte encoding like UTF-8 with MySQL because regular expressions in MySQL is not multibyte safe. Also note that case sensitive collation is required.

Install Files and Create Database Schema

Untar archive and run configure.py script:

$ tar xjf chestnut-ftp-search-VERSION.tar.bz2
$ cd chestnut-ftp-search
$ ./configure.py create-config
$ ./configure.py create-schema

This will create config.py configuration file and database tables. The database parameters will be asked interactively.

Edit config.py and setup your preferences.

Add crontab Entry

You need to add crontab entry to keep your indexes in actual state:

$ crontab -e
0 * * * * /PATH/TO/chestnut-ftp-search/indexer.py

Note that you can specify short period in your crontab entry because actual indexing period is stored in database for each server (you can change it using srvman.py).

Also note that you may run indexer as daemon process (with --daemon option). The crontab entry for indexer is not needed If you run indexer as daemon process.

If the server state indicator is enabled in your configuration, you need to run the pinger periodically to update state information:

*/5 * * * * /PATH/TO/chestnut-ftp-search/pinger.py

Fill up Database

Add information for all FTP servers that you want to index:

$ ./srvman.py add ftp.example1.net
$ ./srvman.py add ftp.example2.net
$ ./srvman.py add ftp.example3.net
...

To get list of all acceptable options and parameters, see:

$ ./srvman.py add --help

At this time you can perform indexing immediately using indexer.py or wait while cron launch it. You can run multiple indexer instances at same time, without any conflicts between it.

Make It Available From HTTP

Using Apache via FastCGI

You need mod_rewrite and mod_fastcgi or mod_fcgid installed and enabled. Copy htaccess-fcgid to .htaccess

To get information about other deployment methods see http://webpy.org/install, http://webpy.org/cookbook

Upgrade

To upgrade to new version of Chestnut FTP Search untar the archive with new version into your installation directory overriding existing files:

$ cd /YOUR/INSTALLATION/DIRECTORY
$ tar xjf /PATH/TO/chestnut-ftp-search-VERSION.tar.bz2 --strip-components 1

Next execute migrate command:

$ ./configure.py migrate PREVIOUS_VERSION

Also check UPGRADE file for version specific notes.

Usage

How Partial Match Works

In Partial match search mode the query string is considered as a substring of file name.

How Exact Match Works

In Exact Match search mode the query string is considered as exact file name.

How Regular Expression Works

In regular expression search mode the query string is considered as POSIX compatible regular expression. In fact the syntax depends on database server.

How Shell Pattern Works

In shell pattern search mode the query string is considered as shell pattern. A shell pattern may contain wildcards such as: * (matches any zero or more characters), ? (matches any one character), [string] (matches exactly one character that is a member of the string), {string1,string2,...} (matches exactly one of string1, string2, ...).

How Transliterated Search Works

In transliterated search the query string is transliterated to ASCII characters and both transliterated and non transliterated variants is used for search.

Currently only Cyrillic letters and some Latin 1 symbols can be transliterated to ASCII characters.

Note that by default transliterated search is disabled. To allow users to use transliterated search set TRANSLIT_ENABLE = True in config.py.

| Собираетесь в Иорданию - Иордания. Иордания с Premium Holiday. | Databases is not strictly free reverse cell phone lookup (because. |