Last active
August 29, 2015 13:56
-
-
Save plasticbrain/9065764 to your computer and use it in GitHub Desktop.
Installing IP2Location c library and apache module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install autoconf gcc build-essential apache2-prefork-dev apache2-threaded-dev libtool | |
$ wget http://www.ip2location.com/downloads/ip2location-apache-5.0.0.tar.gz | |
$ tar xvfz ip2location-apache-5.0.0.tar.gz | |
$ wget http://www.ip2location.com/downloads/ip2location-c-6.0.2.tar.gz | |
$ tar xvfz ip2location-c-6.0.2.tar.gz | |
$ cd ip2location-c-6.0.2/ | |
$ autoreconf -i -v --force | |
$ make | |
$ make install | |
$ cd ip2location-apache-5.0.0/ | |
$ apxs2 -i -a -L /usr/local/bin/ -I ../ip2location-c-6.0.2/libIP2Location/ -l IP2Location -c mod_ip2location.c | |
$ sudo nano /etc/apache2/apache2.conf | |
<IfModule mod_ip2location.c> | |
IP2LocationEnable On | |
IP2LocationSetmode ALL | |
IP2LocationDBFile /var/IP-COUNTRY-REGION-CITY.BIN | |
</IfModule> | |
$ sudo service apache reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment