Skip to content. | Skip to navigation

Navigation

Personal tools

Web Applications

This guide shows how to build several web applications and servers. The basic concept is that of an Apache 2 webserver fronting several application servers (such as Apache Tomcat and Plone). We'll be hosting several domains and handling SSL. To avoid unnecessary rebuilding we'll attempt to reuse existing infrastructure.

GeoIP

Return Geographic data for a given IP address

As this is a freebie we can't expect the geographic DB to be too up to date. But hey!

GeoIP is an open source Geographic data from IP address lookup system. We're going to use it for awstats.

cd .../GeoIP-1.3.14
./configure --prefix=/usr/local/${PWD##*/}
make
make check
make install

We want to install the Perl module, Geo::IP, too! We get problems here as even if you've installed GeoIP into /usr/local you still won't have the shared libraries on your PATH. In the meanwhile, we'll do this:

perl -MCPAN -e shell

 install Geo::IP

The build will fail having not found GeoIP:

look Geo::IP

G=/usr/local/GeoIP-1.3.14
perl Makefile.PL LIBS="-L$G/lib -R$G/lib" INC="-I$G/include"

make
make test
make install

In your Perl 'look' subshell you can confirm things will work by running:

ldd ./blib/arch/auto/Geo/IP/IP.so

which will show the shared library finding libGeoIP.so.1 in /usr/local/GeoIP-1.3.14/lib.

Document Actions