How to Install GeoIP on Linux Virtual Machine (VPS) !!!

, How to Install GeoIP on Linux Virtual Machine (VPS) !!!, Hostripples Web Hosting

Run the following command on Main Node  :

  vzctl set VEID –bindmount_add /tmp,noexec,nosuid,nodev –save –setmode restart —> to make it noexec
   vzctl set VEID –bindmount_add /tmp,nosuid,nodev –save –setmode restart —> to make it exec

 

To Install GeoIP on Linux Virtual Private Server (VPS) follow the following commands :

[[email protected]]# cd /usr/local/src
    [[email protected]]# wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.8.tar.gz
    [[email protected]]# tar -xzvf GeoIP-1.4.8.tar.gz
    [[email protected]]# cd GeoIP-1.4.8
    [[email protected]]# ./configure
    [[email protected]]# make
    [[email protected]]# make install
    [[email protected]]# echo ‘/usr/local/lib ‘ > /etc/ld.so.conf.d/geio.conf
    [[email protected]]# ldconfig
    [[email protected]]# cd ..

Now lets install module mod_geoip2

[[email protected]]# wget http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.7.tar.gz
    [[email protected]]# tar -zxvf mod_geoip2_1.2.7.tar.gz
    [[email protected]]# cd mod_geoip2_1.2.7/
    [[email protected]]# /usr/local/apache/bin/apxs -lGeoIP -cia mod_geoip.c

Now Verify the following configuration files to have proper configurations

[[email protected]]# vi /usr/local/apache/conf/includes/pre_main_global.conf
    [[email protected]]# vi /usr/local/apache/conf/geoip.conf

 

If the server is plesk and you are not able to run the command make and apxs then use

    [[email protected]]#yum install libtool ( If make  gives you error )

    [[email protected]]# updatedb; locate apxs | grep bin (To lcaote if you have the command apxs)

    [[email protected]]# yum install httpd-devel ( If apxs is not present )

 

Thanks,

Scott

 


How to Install GeoIP on Linux Virtual Machine (VPS) !!!, Hostripples Web Hosting
Vishwajit Kale
Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.
Subscribe Now to stay updated.

Please fill in your email address to get most latest updates.