savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers-public] Re: autoredirect setup help


From: Sylvain Beucler
Subject: Re: [Savannah-hackers-public] Re: autoredirect setup help
Date: Wed, 3 Dec 2008 22:25:59 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi!

On Tue, Nov 18, 2008 at 10:20:27AM -0600, Randy Kobes wrote:
> Karl Berry wrote:
>> Hi again,
>>
>> Please reply to address@hidden, which will reach
>> Sylvain and me and everyone else concerned with savannah.
>>
>> Thanks,
>> Karl
>>
>> Date: Wed, 12 Nov 2008 19:49:11 +0100
>> From: Sylvain Beucler <address@hidden>
>> To: Karl Berry <address@hidden>
>> Cc: address@hidden
>> Subject: Re: [Savannah-hackers-public] autoredirect for savannah downloads
>>
>> [...]
>>
>> It will be much easier for me to understand what to do if I can see
>> the final configuration, which is probably the Apache configuration
>> directives.
>>
>>
>> For the Maxmind database, I current use the following set of
>> instructions (which I use when installing AWstats with the geoip
>> module):
>>
>>   aptitude install libgeo-ipfree-perl libgeoip1
>>     mkdir -p -m 755 /usr/local/share/GeoIP/
>>   cat <<'EOF' > /etc/cron.d/maxmind
>>   # Update Country/City IP-lookup databases from MaxMind
>>   # TODO: use -o /dev/null, then use $? to check if the download was 
>> successful
>>   0 3 10 * *      root    wget 
>> http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz -O- | zcat > 
>> /usr/local/share/GeoIP/GeoIP.dat
>>   10 3 10 * *     root    wget 
>> http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O- | zcat 
>> > /usr/local/share/GeoIP/GeoLiteCity.dat
>>   EOF
>>     # TODO: do this non-interactively
>>   aptitude install build-essential
>>   perl -MCPAN -e shell
>>   # > install Geo::IP
>>
>>
>> [...]
>>
>
> Hi all,
>     For the Apache side of things, there's two set of directives I use,  
> as I'm running a "vanilla" server on port 80 and a mod_perl-enabled  
> server on port 8043. For the vanilla server, I have
>
> <VirtualHost theoryx5.uwinnipeg.ca>
>         ServerAdmin address@hidden
>         ServerName mirror.ctan.org
>         ProxyPass / http://theoryx5.uwinnipeg.ca:8043/ctan/
>         ProxyPassReverse / http://theoryx5.uwinnipeg.ca:8043/ctan/
> </VirtualHost>
>
> while the mod_perl one has
>
> <Location /ctan>
>    SetHandler perl-script
>    PerlSetVar GeoIPDBFile "/usr/local/share/GeoIP/GeoIP.dat"
>    PerlSetVar GeoIPMirror "/usr/local/share/GeoIP/ctan.txt"
>    PerlSetVar GeoIPFlag Standard
>    PerlSetVar GeoIPDefault us
>    PerlResponseHandler Apache2::Geo::Mirror->auto_redirect
> </Location>
>
> I've attached a cron shell script that I use to update the database,  
> which invokes the attached perl script - one would need to change the  
> location to move the database file at the end of this script to reflect  
> where you want it placed.
>
> Let me know if you have any questions about this.

Sorry about the delay.
I got a build failure.

cpan> install Apache2::Geo::Mirror
CPAN: Storable loaded ok
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://mir1.ovh.net/ftp.cpan.org/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
Fetching with LWP:
  ftp://mir1.ovh.net/ftp.cpan.org/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Tue, 02 Dec 2008 23:26:53 GMT

  There's a new CPAN.pm version (v1.9301) available!
  [Current version is v1.7602]
  You might want to try
    install Bundle::CPAN
    reload cpan
  without quitting the current session. It should be a seamless upgrade
  while we are running...

Fetching with LWP:
  ftp://mir1.ovh.net/ftp.cpan.org/modules/03modlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Running install for module Apache2::Geo::Mirror
Running make for R/RK/RKOBES/Apache-GeoIP-1.63.tar.gz
Fetching with LWP:
  
ftp://mir1.ovh.net/ftp.cpan.org/authors/id/R/RK/RKOBES/Apache-GeoIP-1.63.tar.gz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
  ftp://mir1.ovh.net/ftp.cpan.org/authors/id/R/RK/RKOBES/CHECKSUMS
Checksum for 
/root/.cpan/sources/authors/id/R/RK/RKOBES/Apache-GeoIP-1.63.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Apache-GeoIP-1.63/
Apache-GeoIP-1.63/Apache2/
Apache-GeoIP-1.63/Apache2/Geo/
Apache-GeoIP-1.63/Apache2/Geo/IP/
Apache-GeoIP-1.63/Apache2/Geo/IP/Record.pm
Apache-GeoIP-1.63/Apache2/Geo/Mirror.pm
Apache-GeoIP-1.63/Apache2/Geo/IP.pm
Apache-GeoIP-1.63/Apache2/t/
Apache-GeoIP-1.63/Apache2/t/response/
Apache-GeoIP-1.63/Apache2/t/response/TestGeoIP/
Apache-GeoIP-1.63/Apache2/t/response/TestGeoIP/mirror.pm
Apache-GeoIP-1.63/Apache2/t/response/TestGeoIP/basic.pm
Apache-GeoIP-1.63/Apache2/t/response/TestGeoIP/ip.pm
Apache-GeoIP-1.63/Apache2/t/response/TestGeoIP/name.pm
Apache-GeoIP-1.63/Apache2/GeoIP.pm
Apache-GeoIP-1.63/GeoIP.dat
Apache-GeoIP-1.63/libGeoIP_internal.h
Apache-GeoIP-1.63/Changes
Apache-GeoIP-1.63/Apache/
Apache-GeoIP-1.63/Apache/t/
Apache-GeoIP-1.63/Apache/t/response/
Apache-GeoIP-1.63/Apache/t/response/TestGeoIP/
Apache-GeoIP-1.63/Apache/t/response/TestGeoIP/ip.pm
Apache-GeoIP-1.63/Apache/t/response/TestGeoIP/basic.pm
Apache-GeoIP-1.63/Apache/t/response/TestGeoIP/mirror.pm
Apache-GeoIP-1.63/Apache/t/response/TestGeoIP/name.pm
Apache-GeoIP-1.63/Apache/Geo/
Apache-GeoIP-1.63/Apache/Geo/IP/
Apache-GeoIP-1.63/Apache/Geo/IP/Record.pm
Apache-GeoIP-1.63/Apache/Geo/Mirror.pm
Apache-GeoIP-1.63/Apache/Geo/IP.pm
Apache-GeoIP-1.63/Apache/GeoIP.pm
Apache-GeoIP-1.63/libGeoIP.c
Apache-GeoIP-1.63/MANIFEST
Apache-GeoIP-1.63/typemap
Apache-GeoIP-1.63/Apache_GeoIP.xs
Apache-GeoIP-1.63/Apache2_GeoIP.xs
Apache-GeoIP-1.63/META.yml
Apache-GeoIP-1.63/t/
Apache-GeoIP-1.63/t/conf/
Apache-GeoIP-1.63/t/conf/apache_mirror.txt
Apache-GeoIP-1.63/t/conf/cpan_mirror.txt
Apache-GeoIP-1.63/t/conf/auto_mirror.txt
Apache-GeoIP-1.63/t/geoip/
Apache-GeoIP-1.63/t/geoip/mirror.t
Apache-GeoIP-1.63/t/geoip/name.t
Apache-GeoIP-1.63/t/geoip/ip.t
Apache-GeoIP-1.63/t/geoip/auto_mirror.t
Apache-GeoIP-1.63/t/TEST.PL
Apache-GeoIP-1.63/MANIFEST.SKIP
Apache-GeoIP-1.63/libGeoIPCity.c
Apache-GeoIP-1.63/libGeoIP.h
Apache-GeoIP-1.63/libGeoIPCity.h
Apache-GeoIP-1.63/INSTALL
Apache-GeoIP-1.63/Makefile.PL
Apache-GeoIP-1.63/README

  CPAN.pm: Going to build R/RK/RKOBES/Apache-GeoIP-1.63.tar.gz

Should I use the GeoIP.dat under /usr/local/share/GeoIP? [yes] 
Install mod_perl-2 version? [yes] 
mkdir lib
mkdir lib/Apache2
mkdir t/response
mkdir t/response/TestGeoIP
mkdir lib/Apache2/Geo
mkdir lib/Apache2/Geo/IP
Argument "6.30_01" isn't numeric in numeric ge (>=) at Makefile.PL line 134.
Checking if your kit is complete...
Looks good
[   info] generating script t/TEST
Can't use string ("Apache::TestMM") as a HASH ref while "strict refs" in use at 
/usr/lib/perl5/Apache/TestMM.pm line 56.
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install




For reference, here's my install procedure so far, based on Debian Etch:

aptitude install libgeo-ipfree-perl
aptitude install build-essential libapache2-mod-perl2-dev
#aptitude install -t etch-backports libgeoip-dev
# If libgeoip is too old:
aptitude install zlib1g-dev
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.5.tar.gz
./configure &&  make && make install
mkdir -p -m 755 /usr/local/share/GeoIP/
cat <<'EOF' > /etc/cron.d/maxmind
# Update Country/City IP-lookup databases from MaxMind
# TODO: use -o /dev/null, then use $? to check if the download was successful
0 3 10 * *      root    wget 
http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz -O- | zcat > 
/usr/local/share/GeoIP/GeoIP.dat
10 3 10 * *     root    wget 
http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -O- | zcat > 
/usr/local/share/GeoIP/GeoLiteCity.dat
EOF

perl -MCPAN -e shell
> install Geo::IP
> install Apache2::Geo::Mirror



Do you have a clue about what's wrong?
Maybe it has recent version requirements for mod-perl & al.?

-- 
Sylvain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]