Created
December 17, 2009 14:56
-
-
Save dennmart/258788 to your computer and use it in GitHub Desktop.
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
GeoIP C API /Gem Install on Intel Mac | |
# Download the GeoIP C API. | |
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz | |
# Uncompress and install GeoIP C API from source. | |
tar zxvf GeoIP-1.4.6.tar.gz | |
cd GeoIP-1.4.6 | |
env ARCHFLAGS="-arch i386" ./configure --prefix=/srv/GeoIP | |
env ARCHFLAGS="-arch i386" make | |
sudo env ARCHFLAGS="-arch i386" make install | |
# Install the geoip_city gem, using the location where the GeoIP C API was installed. | |
gem install geoip_city -- --with-geoip-dir=/srv/GeoIP | |
# If using Ruby Enterprise and Phusion Passenger, install using REE's gem instead. | |
/opt/ruby-enterprise-1.8.x-xxxx.xx/bin/gem install geoip_city -- --with-geoip-dir=/srv/GeoIP | |
# Grab the latest copy of the GeoLite City database and place it in the GeoIP C API shared directory. | |
wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
gunzip GeoLiteCity.dat.gz | |
mv GeoLiteCity.dat /srv/GeoIP/share/GeoIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment