How to install the GeoIP plugin to show country information in Awstats cPanel


Follow these instructions to install and enable the GeoIP plugin in awstats:

Requirement :

1.Root access to server (ssh access)
2. Install GNU Compiler Collection (gcc)
3.Install the GeoIP by executing the following commands in SSH:
Commands :

# wget http://maxmind.com/download/geoip/api/c/GeoIP.tar.gz
# tar xzvf GeoIP.tar.gz
# cd GeoIP*
# ./configure && make && make install

Install the GeoIP Perl module using CPAN :

command :

# cpan

NOTE:  If this is the first time you’re using CPAN, you will be prompted about automatic setup. If you see “Are you ready for manual configuration? [yes]” — type no. If you see “Would you like me to configure as much as possible automatically? [yes]” — type yes.

Then installed the GEoIP per module by executing the below command :

Command :

# install Geo::IP

Then

Command:

# quit

to exit the CPAN shell.

Once installed enable the plugin in the awstats.conf as below :
Command :
# vi /usr/local/cpanel/etc/awstats.conf

Insert this code end of the file :

LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

Save File.

To enable it for a specfic user then follow the insturction as below :

Command :

# vi /home/username/tmp/awstats/awstats.domainname.conf

NOTE: username and domainname will be replaced by your username and domainname.

Add the code end of the file :

LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

Save file.

Once done. Update the weblogs via executing command :

Command:

# /scripts/runweblogs username

Note : username will be replaced by your username.

You’re done now!!!!! You will be able to see the GeoIP in your stats page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: