Software nerdchow.com

Download Fluff on this page
Get the latest news
Changelog
Task list
Installation help
View and report bugs

See some servers that use Fluff:
Spies.com FLF

a ceejbot project

Installing Fluff for Linux

  1. Download Fluff_Parser.

    fluff_parser.tar.gz
    fluff_parser.zip

    Unpack it:

    gunzip < fluff_parser.tar.gz | tar xvf -
    or just
    gtar xvzf fluff_parser.tar.gz

    I use Stuffit Expander on Windows and Macintosh.

  2. Install the required software packages.

    If you're not already running the prerequisite software, go get it now. MySQL and the Perl drivers for MySQL are required. PHP is required only if you want to use PHP to display the stats on the web. You can use Perl or Tcl instead. The example files use PHP 4.

    » Download the latest version of mysql:
    http://www.mysql.com/downloads/index.html

    » Install DBD:mysql to use mysql from Perl. The easiest way to do this is with CPAN:
    perl -MCPAN -e 'install Bundle::DBD::mysql'

    Or you can install it the old-fashioned way from here:
    http://www.cpan.org/authors/id/JWIED/DBD-mysql-1.2212.x86.tar.gz

    » Download the latest version of PHP:
    http://www.php.net/downloads.php

    Please don't ask me for help getting this software to work on your system. If you need it, you're probably not ready to help me beta-test.

  3. Create a database to use.

    mysqladmin -u root -p create flf_stats

    Next, create a database user that has access privileges for your new database. You'll probably want to create two users: one with write privileges for the parser program, and one with SELECT only privileges for the web display.

    mysql -u root -p mysql
    mysql> GRANT ALL PRIVILEGES ON flf_stats.* TO flf_db_writer@localhost IDENTIFIED BY 'some_password';
    mysql> GRANT SELECT ON flf_stats.* TO flf_db_reader@localhost IDENTIFIED BY 'some_password';

    You can find more help with creating users in the mysql docs:
    http://www.mysql.com/doc/A/d/Adding_users.html

    Next, create tables in the database using the provided schema.

    mysql flf_stats -u flf_db_writer -p < bin/Fluff_Schema.tmpl

  4. Edit the Fluff config file.

    All the configuration information is cached in one file, fluff.cfg. Edit it and change all the variables to match your setup.

    The web-accessible final home of all the PHP files:
    $destination = "/home/games/web/flf";

    Where your FLF logs live normally:
    $logDir = "/home/games/hlds_l/frontline/logs/";

    The name of the database you chose for Fluff:
    $db_name = "flf_stats";

    Where the database lives. Leave it at localhost unless you've set Fluff up with a database on another host:
    $db_host = "localhost";

    The name and password of the db user that has UPDATE and INSERT permissions for your Fluff database. Used by the perl script:
    $db_user = "flf_db_writer";
    $db_pword = "writer-password-here";

    The name and password of the db user that has just SELECT permissions for your database. Used by the web pages:
    $db_web_user = "flf_db_reader";
    $db_web_pword = "reader-password-here";

  5. Run the install script.

    Run the install script:

    ./install.pl

    This script will move all the files to their final homes and set up permissions. It will also write the config information at the top of Fluff_Parser.pl and flf_db_init.php.

    I HAVEN'T TESTED THIS ON WINDOWS.

  6. Think about security.

    Important! Make sure that nobody can get access to bin/ from the web! With apache, you can use a .htaccess file to deny access to the whole bin directory. Other web servers use other techniques. The safest thing is to put the bin directory somewhere else. The file bin/flf_db_init.php will need to be world-readable, however, so that the web server can get access to it.

    If you do move the bin directory, you'll need to edit the config info in the final files. Point bin/Fluff_Parser.pl to the directory where you put it and its supporting files:

    local $includeDir = "/home/games/FluffFiles/";

    Edit flf_config.php to point the web pages to wherever you put flf_db_init.php:

    $include_dir = "bin";

    And you'll need to edit flf_search.php, which includes the db init file by hand.

  7. Run the parser.

    To parse a single file:
    Fluff_Parser.pl -d -L /full/path/to/log/file/L0104012.log

    Use the -L option with scripts that process log files after every game. For example, I have hlds_ld run Fluff with the -L option at the end of each map.

    To parse all the files in a directory (note trailing slash), useful for processing your archived logs: Fluff_Parser.pl -d -D /full/path/to/directory/

    To parse all the log files in your default logs directory:
    Fluff_Parser.pl -d

    When invoked this way, Fluff_Parser will skip the last log file in the directory, assuming that it's the log file for a game in progress.

    To skip storing the data in your database, leave off the "-d" option. This isn't very useful except for debugging.

  8. Customize.

    Edit the PHP files until you get something that looks good for your site. The sidebar_siteid.html file points to an image that will be broken for you. An incentive! You'll also want to edit the style sheets: style_explorer.css for all Exploiter platforms and style_netscape.css for everybody else. I haven't yet done a good job of pulling PHP code out of the html presentation, and vice versa. It's something I'll work on for future releases.



Top | Blog | Journal | Software
Part of the world wide web since 1994. Made with Macintosh.
Copyright 1994-2008 C J Silverio.