Basic instructions in ePrintsStatsSetup.pdf (comes with distribution). First: % fink install geoip % cpan install Geo::IPfree Configuration config/inc.vars.es.php * connections/sqlpass_public => stats database password * connections/sqlserver => stats database server * filelocation/base_install_dir => /usr/local/eprints/ePrintsStats * general/admin_name, _email, support_name, _email => appropriate values * general/eprints_location => http://eprints.otago.ac.nz scripts/eprints-usage.php * $log_dir => /sw/var/apache2/logs/ (or possibly /var/log/httpd/) * $log_file: "UTasER" => stats datavase name ("otago_eprints") * $sqlserver => stats database server * $sqlpass => stats database password * $sqlserver2 => EPrints database server * $sqluser2 => otago_eprints * $sqlpass2 => otago_eprints password scripts/add_country.pl * $dsn => stats database server (DBI DSN) * $password => stats database password sql/db.schema.eprintstats.sql * change both stats database passwords at end (do you need to use OLD_PASSWORD?) vhost/apache.conf Alias /es => /usr/local/eprints/ePrintsStats/htdocs php_admin_value error_log => "/usr/local/eprints/ePrintsStats/logs/php.error.log" php_admin_value open_basedir => "/usr/local/eprints/ePrintsStats:/usr/local/lib/php" php_admin_value include_path ".:/usr/local/eprints/ePrintsStats/includes:/usr/local/eprints/ePrintsStats/config:/usr/local/lib/php" (may need to change php lib paths depending on environment, e.g., on my machine it's /sw/lib/php4) Fixes to scripts/eprints-usage.php: The script is set up for "long" EPrints URLs for documents, of the form /archive/00000023/01/foo.pdf. If short_urls is turned on, the regular expressions won't match (short URLs look like /23/01/foo.pdf). The solution is to add a regex for short URLs to the ifs on lines 65 and 86: 65: || (preg_match("/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(.*?)\] \"GET \/(\d{1,4}).*? HTTP\/1..\" 200 .*/i",$buffer,$matches)) 86: || preg_match("/GET \/\d{1,4}\/\d\d\//i",$buffer) There appears to be an extra inc.html.footer.es.php in htdocs that shouldn't be there (it overrides the same file in includes). Also apparently unnecessary are header.html, footer.html and phpinfo.php. EPrints config changes EXTREMELY IMPORTANT! Add '/es' to rewrite_exceptions. In otago_eprints/cfg/apachevhost.conf: Include /usr/local/eprints/ePrintsStats/vhost/apache.conf Geo::IPfree config % cd <PERL5LIB>/Geo Then follow the instructions in the ePrintsStats document.