Instructions for installing ftpStats for the first time:

1. MySQL preparation:
	Create two databases, one for storing information, the other for
	temporary tables.
	mysql> CREATE DATABASE ftpstats;
	mysql> CREATE DATABASE ftpstats_tmp;

	Assign permissions to the ftpstats users:
	# mysql -u [username] -p [password] ftpstats < sql-init.sql

	Specify your root [username] and [password] so it may grant all 
	privileges required. The ftpstats in the command line is the first
	database you specified earlier.

	It is recommended to change the default passswords for the MySQL
	users ftpstats and ftpstats_ro by issuing the commands:
	$ mysqladmin -u ftpstats_ro -pftpstats_ro password 'new-password'
	$ mysqladmin -u ftpstats -pftpstats password 'new-password'

	Put these passwords in MySQL/ftpstats.ini and www/lib/.htConf.ini
	Having the files not world-readable would also be a good idea, eg:
	# chmod 640 www/lib/.htConf.ini
	# chown root.apache www/lib/.htConf.ini

	And since ftpstats.ini is probably run as root:
	# chmod 600 MySQL/ftpstats.ini
	# chown root.root MySQL/ftpstats.ini


2. Config file preparation:
	Edit www/lib/.htConf.ini to suit your requirements. See the in-file
	comments for help. Specify a user/pass which has SELECT priviledges
	to the xfers table, and complete access to the ftpstats_tmp database.

	Adjust MySQL/ftpstats.ini to suit your needs, e.g.
	logfile = pureftpd
	db_pass = <password for mysql-user ftpstats>

2a. Localisation (optional)
	If you want to use localisation, see the README in the po/ directory
	and follow the instructions before doing step 3.

3. Copy files to the wwwroot:
	Everything in the www/ directory needs to be accessible by your web
	server. Copy it all over, maintaining the directory structure. In
	case of upgrades, don't copy the .htConf.ini - you'll want to keep
	your own settings.

	If you want the page to be private, add a .htaccess file denying
	everything except from yourself.

4. Populate the tables:
	You can do this any way you like. A Perl script is provided to do
	the job for you. See the contents of the MySQL/ directory.
	After editing ftpstats.ini to suit your requirements, invoke it:
	# ./ftpstats.pl <logfile

	Everything in logfile which is later than the transfers already in
	the database will be inserted into MySQL.
