Install GeoIP on CPanel CentOS server
![]() | ![]() | ![]() | ![]() |
December 29, 2009 Server Administration
nstall GeoIP binaries:
yum install GeoIP GeoIP-devel
Download more databases from MaxMind and put them into /opt/geoip/share/GeoIP/:
Install CPanel EasyApache GeoIP module:
- View details:http://www.cpanel.net/apps/easyapache/custom.html
- Download mod_GeoIP:
wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_geoip.tar.gz
- Run EasyApache and select mod GeoIP:
/scripts/easyapache
Configure GeoIP by adding to httpd.conf (or pre_virtualhost_global.conf):
/usr/local/apache/conf/httpd.conf/usr/local/apache/conf/includes/pre_virtualhost_global.conf
GeoIPEnable On
GeoIPDBFile "/opt/geoip/share/GeoIP/GeoIP.dat"
Install GeoIP PHP Extension:
- Make sure that
/tmpis mounted with exec option:
mount -o,remount,rw,exec /tmp
- Install geoip via PECL:
pecl install geoip
Restart Apache:
/scripts/restartsrv_apache




Stumble Upon
Del.icio.us
Buzz

