- download GeoIP C API, extract to working dir [/PATH/TO/WORK]
wgettar zxvf - download GeoIP Perl Module (Geo::IP)
wget - cd /PATH/TO/WORK
./configure –prefix=/PATH/TO/GeoIP_Cmake
make check
make install
make clean (optional) - Pay your attention to the message
Libraries have been installed in:
/PATH/TO/INSTALL/GeoIP/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/ld.so.conf’See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages. - Install Geo::IP perl module (faster, but requires C library)
cd /PATH/TO/GeoIP_PERL
perl Makefile.PLmake
make test
make install
make clean (optional) - Extending the perl library path to include your Geo::IP installation
vim /PATH/TO/AWSTATS/cgi-bin/awstats.pl
add one line just below “require 5.007;”:BEGIN { push @INC, ‘/PATH/TO/INSTALL/GeoIP/lib/perl/5.10.0’ }
歷史上的今天
- A Chinese Law Goes Faster Than Moore's Law - 2011
- BBC: The most-read stories of 2009 - 2009
- 名家觀點》景氣寒冬之策略思維 - 2008
- 人因夢想而偉大,我因機車而貧窮 - 2002