Installation

Installation is easy:

  • create database tables
  • configure it
  • add some servers to index in the db tables
  • run !

Create database tables

SQL creation scripts are provided for MySQL & Oracle. Run the script on your preferred database to create the following tables:

  • ftpServer
  • ftpServerType
  • ftpDir
  • ftpFile

Configuration

There is a sample configuration file provided in the ... directory.

First of all you need to let the indexer know where to store its data.
For MySQL set the storage.impl to the MySQL storage class:
storage.impl=net.rrm.ftpinsidexer.storage.MySQLStorage

Oracle:
storage.impl=net.rrm.ftpinsidexer.storage.OracleStorage

Change the storage.url property to the connectionstring of your database and set storage.username and storage.password to appropiate values.

The default time-out of an FTP action is 5 seconds, if this doesn't suit your needs change the ftpTimeout property to the desired amount of milliseconds (5 seconds = 5000 ms).

3 servers are indexed simultaneously, if you need more or less change the maxConcurrentThreads property.

To gracefully shut down the indexer or list its current queue of sites it indexes you can telnet to it. The required password and listening port are configured with commandServerPort and commandServerPassword

Add some servers to index

Fill the ftpServer table with some data, not all columns are required. Required columns are:

  • serverID
    unique numeric ID for this server. autoinc on MySQL, sequence in Oracle
  • address
    hostname or IP of the FTP server
  • port
    portnumber
  • indexUsername
    speaks for itself
  • indexPassword
    speaks for itself
  • name
    optional name for the server
  • ftpMode
    A for active, P for passive

Running

Starting

Use the supplied batch script or shell script to start the indexer. If you compiled it yourself make sure you have the externel jars in the right place.

Flow

Every 5 minutes the indexer checks the database for new servers to be indexed. A server is eligable for indexing when it's last index run was more than 24 hours ago (db column indexEndDate).
more to follow