Results 1 to 3 of 3
Hi guy's,
I am running Webalizer on my CentOS Linode to view stats for each site I host. I wanted to patch Webalizer with the Geolizer patch so that the ...
- 01-20-2012 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 7
GeoIP and mod_geoip2
Hi guy's,
I am running Webalizer on my CentOS Linode to view stats for each site I host. I wanted to patch Webalizer with the Geolizer patch so that the location of visitors is more precise.
I found that I would need GeoIP and mod_geoip2 installed first so I found this guide.
How to install GeoIP and mod_geoip2 on centos for apache
1) yum install GeoIP GeoIP-devel GeoIP-data zlib-devel
2) mkdir /usr/local/share/GeoIP
3) Download the latest Country and City database files from maxmind
cd /usr/local/share/GeoIP
wget (link to) /GeoIP.dat.gz
wget (link to) /GeoLiteCity.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoLiteCity.dat.gz
4) yum install httpd-devel apr-devel
5) wget (link to) /mod_geoip2_1.2.5.tar.gz
6) tar xvzf mod_geoip2_1.2.5.tar.gz && cd mod_geoip2_1.2.5
7) apxs -i -a -L/usr/lib64 -I/usr/include -lGeoIP -c mod_geoip.c
Enabling mod-geoip
Nothing’s going to work unless mod-geoip is enabled in your apache configuration. You’ll need the following lines in your httpd.conf file (located on CentOS systems at /etc/httpd/conf/httpd.conf)
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/local/share/GeoIP/GeoIP.dat Standard
GeoIPDBFile /usr/local/share/GeoIP/GeoLiteCity.dat Standard
</IfModule>
9) Restart Apache so your changes will take effect by entering the following command.
#/etc/init.d/httpd restart
10) /usr/local/bin/geoipupdate
I followed it step by step but I am getting the following output at step 7:
Code:
/usr/lib/apr-1/build/libtool –silent –mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include -c -o mod_geoip.lo mod_geoip.c && touch mod_geoip.slo
mod_geoip.c: In function ‘geoip_header_parser’:
mod_geoip.c:328: warning: implicit declaration of function ‘ap_add_common_vars’
mod_geoip.c:423: error: ‘GEOIP_NETSPEED_EDITION_REV1′ undeclared (first use in this function)
mod_geoip.c:423: error: (Each undeclared identifier is reported only once
mod_geoip.c:423: error: for each function it appears in.)
mod_geoip.c:458: warning: implicit declaration of function ‘GeoIP_country_id_by_addr_v6′
mod_geoip.c:546: error: ‘GEOIP_CITY_EDITION_REV0_V6′ undeclared (first use in this function)
mod_geoip.c:547: error: ‘GEOIP_CITY_EDITION_REV1_V6′ undeclared (first use in this function)
mod_geoip.c:303: warning: unused variable ‘gip’
apxs:Error: Command failed with rc=65536
.
To be honest I don't even know what the step 7 command does (stupid I know
)
Does anyone have any info on what this does and also where I am going wrong?
Thanks,
Tom
- 01-21-2012 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,788
Do you know if you are on 32-bit vs 64-bit?
Your apxs command is compiling against 64-bit libraries (or trying to, based upon the -L/usr/lib64 argument).Code:uname -a
- 01-21-2012 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 7
Hi, thanks for the reply. It is a 32 bit distribution.
I had wondered about that line
Thanks,
Tom


Reply With Quote
