UPDATE September 2nd 2013.
start it using ./ip2locationd start

ip2location is now on all computers, those being main1, virginia1, wc1 and wc2.

If you invoke jps -m, you should see a process like
2046 FrostIP2Location

if a Launcher process is there and no FrostIPLocation shows, and when you try to launch the port is bound
kill the Launcher process, that's an old version or somehow it managed to run anonymously.

the ip2location.frostwire.com domain has been mapped on route53 DNS to:
50.16.13.109  virginia1
50.18.89.159 wc2
72.232.160.178 main1
184.169.193.65 wc1

the database lives inside ip2location.frostwire.com/java/

UPDATE August 6th 2012.

I've bought a new year worth of the DB.

I've not bought the Java license though. let's see f we can get by with the PHP driver alone (free vs $100/year)

The new DB will be in php/ and it won't be in mercurial, it'll be rsynced to all the machines.

INVOCATION OF ip2location.frostwire.com

 -> http://ip2location.frostwire.com/[<ip address>]
 Will return :
 "country_short=<Country Code>|country_name=<Country Name>" 
 of the IP that makes the request.
 If the optional <ip address> parameter is passed, it will do the query for that ip address instead

 -> http://ip2location.frostwire.com/all/[<ip address>]
 Will return 
 "country_short=<Country Code>|<Country Name>|<Region>|<City>|<Isp Name>"  of the IP that makes the request
 If the optional <ip address> parameter is passed, it will do the query for that ip address instead

 -> http://ip2location.frostwire.com/isnewyorker/[<ip address>]
 Will return '1' if the IP (from the requester, or passed) is located anywhere in New York City
 (NEW YORK, BROOKLYN, QUEENS, BRONX, LONG ISLAND CITY) [Staten island has been taken out on purpose]
 This request won't attempt to connect to the database, instead it will use a sorted list of
 ip ranges loaded in memory and perform binary search on them. Ips that are found will be cached
 on a limited sized stack to avoid further searches.

 -> http://ip2location.frostwire.com/showcache
 Will show a cache of New Yorker IPs and how many times the IPs have hit the cache.

 -> http://ip2location.frostwire.com/clearcache
 Will clear the New Yorker IPs cache

CONFIGURATION

lighttpd points all requests gone to ip2location.frostwire.com to ip2location.py.

You must start ip2location.fcgi issuing

python ip2location.py&

You can end your ssh session and it will still be running.

If you need to load the data, ip2location.fcgi can be modified near the end of the code,
just uncomment two functions and make sure you have the .CSVs for ipcountry and ipcountryregioncityisp,
ip2location.fcgi will wipe out the current database, and recreate the tables and indices
from the CSV files. This process could take hours, it needs an optimization and there's probably
notes on the code on how to do it faster.

The configuration on lighttpd looks as follows:

$HTTP["host"] =~ "^ip2location.frostwire.com$" {
  server.document-root = "/var/www/ip2location.frostwire.com/"
  server.errorlog = "/var/log/lighttpd/ip2location.frostwire.com/error.log"
  accesslog.filename = "/var/log/lighttpd/ip2location.frostwire.com/access.log"
  server.error-handler-404 = "error.php"
  fastcgi.server =    ( ".py" =>
                        ( "localhost" =>
                            ( "min-procs" => 1,
                              "host" => "127.0.0.1",
                              "port" => 9999
                            )
                        )
                    )
  url.rewrite-once = (
   "^(/.*)$" => "/ip2location.py$1"
  )
}