GeoIP Legacy City Database Installation Instructions

Source: Internet
Author: User
Tags geoip uncompress

Here are a brief outline of the steps needed to install GeoIP Legacy City on Linux/unix. The installation on Windows are similar, just replace the tar command with WINZIP or a similar ZIP program.

Step 1–download Database

For GeoIP clients, go to the Download files page. Need to enter your username and password. From there, you can download the binary or CSV formats of the GeoIP databases you purchased. Then you'll want to upload the databases to your Web server.

If you aren't a client, you can use the free GeoLite database. Download it from the GeoLite page.

If you is using the wget program to download the GeoLite file, please use the-n option to only download if the file has been updated:

$ wget-n http://geolite.maxmind.com/download/geoip/database/geolitecity.dat.gz
Step 2–install Database

Once You has uploaded the database, you'll want to uncompress it. To uncompress the binary format, you'll need to unzip the file. For example, to uncompress the GeoIP City binary database on Linux or Unix, you could run:

$ gunzip GeoLiteCity.dat.gz

Then you'll need to install the. dat file into a data directory. For example, on Linux/unix, you could run:

$ MV geolitecity.dat/usr/local/share/geoip/

To uncompress the CSV format, you can use any of the ZIP program, such as WinZip for Windows, or unzip on Linux. Then you can load the CSV database into a SQL database. Learn More

Step 3–query Database

For the binary databases, we supply APIs for most major programming languages. Need to point the API code to The/usr/local/share/geoip/geolitecity.dat location. Each API has documentation and example programs inside the downloaded distribution. The fastest-to-get started is-to-use the example program included. Need to replace the database path in the example program with the location where you installed the database.

For the CSV databases, once you has loaded them into a SQL database, you can issue SQL queries against the database table With the GeoIP data. Learn More

If you don't have a shell access to the server

After you had downloaded the database, unzip it using a program like WINZIP. Then rename the *.dat file to GeoIP.dat, GeoIPRegion.dat, or GeoIPCity.dat, for the GeoIP country, region or city database S, respectively. Finally upload the *.dat file to The/usr/local/share/geoip or other user-specified folder on your server using FTP or Ano ther upload mechanism.

GeoIP Legacy City Database Installation Instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.