~ Install Mod_GeoIP in centos ~

| apache | No Comments
yum update

yum install mod_geoip GeoIP GeoIP-devel GeoIP-data zlib-devel

cd/usr/share/GeoIP/
mv GeoIP.dat GeoIP.dat_org
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz

nano /etc/httpd/conf/httpd.conf
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
</IfModule>
nano /var/www/html/testgeoip.php
<?
var_dump(getenv(GEOIP_COUNTRY_NAME))

 

トラックバック

このブログ記事に対するトラックバックURL:

コメント & トラックバック

No comments yet.

Comment feed

コメントする

Smiley face

April 2024
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930