Forum Moderators: bakedjake
here are the instructions for installing mod geoip
----------------------------------------------------
----------------------------------------------------
1. Get root privileges and move to an empty dir: su -
mkdir /home/admin/geoip
cd /home/admin/geoip
2. Download and install library:
wget http://www.maxmind.com/download/geoip/api/.../c/GeoIP.tar.gz
tar xzfv GeoIP.tar.gz
cd GeoIP*
./configure
make
make check
make install
cd ..
3. Download and build Module:
mkdir mod_geoip
cd mod_geoip
wget http://www.maxmind.com/download/geoip/api/...ip_1.1.1.tar.gz
tar xzfv mod_geoip_1.1.1.tar.gz
cd mod_geoip_1.1.1
apxs -cia -I/usr/local/include -L/usr/local/lib -lGeoIP mod_geoip.c
4. Add /usr/local/lib as a loadable dynamic link:
edit /etc/ld.so.conf and add /usr/local/lib at the bottom so it looks like this:
/usr/kerberos/lib
/usr/lib/mysql
/usr/X11R6/lib
/usr/local/lib
Then execute /sbin/ldconfig /etc/ld.so.conf
5. Review httpd.conf . You should have seen a backup of the httpd.conf has been made when building the module as mod_geoip info has been inserted.
You'll find 2 lines inserted about mod_geoip.
First one:
LoadModule geoip_module lib/apache/mod_geoip.so
change to
LoadModule geoip_module /usr/lib/apache/mod_geoip.so
Add below that line:
GeoIPEnable On
the the second line is OK ... just move it to the AddModule section to keep httpd.conf pretty:)
AddModule mod_geoip.c
6. Go and restart Apache and you should not get any error.
service httpd restart
Then you can set the cron jobs to get updated databases (if you got a license) or just leave as is to keep using the free one included ( they say the free one is also updated monthly .. but will need manual download )
----------------------------------------
----------------------------------------
Actual results when i try to install it
Am not unix guy , all these command you have written are plain english for me except for basics like mkdir etc
I am not able to get it to work i shall be thankful if you can help me out
here are steps which have been told and here is what i have been able to do
Am not able to cover even two steps so am taking these only
1. Get root privileges and move to an empty dir:
su -
mkdir /home/admin/geoip
cd /home/admin/geoip
I have got directory structure as
/var/www/html in
html folder i have made geoip folder as said above
then i changed directory to geoip as in cd command above
2. Download and install library:
wget [maxmind.com...]
tar xzfv GeoIP.tar.gz
cd GeoIP*
I have been able to get the file from max server successfully
./configure
i ran this command and it some processing and last few lines were
config.status: creating libGeoIP/Makefile
config.status: creating apps/Makefile
config.status: creating conf/Makefile
config.status: creating data/Makefile
config.status: creating man/Makefile
config.status: creating test/Makefile
then it again stopped at command prompt , i guess it has been completed
make
make check
Then i ran this command and last few lines were
PASS: test-geoip
==================
All 1 tests passed
==================
make[2]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/test'
make[1]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/test'
Making check in man
make[1]: Entering directory `/var/www/html/geoip/GeoIP-1.4.2/man'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/man'
make[1]: Entering directory `/var/www/html/geoip/GeoIP-1.4.2'
make[1]: Nothing to be done for `check-am'.
make[1]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2'
make install
Now when i run this command i get errors
it says something like
Libraries have been installed in:
/usr/local/lib
If 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( manual pages.
----------------------------------------------------------------------
/bin/sh ../libtool --mode=install /usr/bin/install -c libGeoIPUpdate.la /usr/local/lib/libGeoIPUpdate.la
libtool: install: warning: relinking `libGeoIPUpdate.la'
(cd /home/ilove/www/geoip/GeoIP-1.4.2/libGeoIP; /bin/sh ../libtool --mode=relink gcc -g -O2 -o libGeoIPUpdate.la -rpath /usr/local/lib GeoIPUpdate.lo md5.lo -lz libGeoIP.la )
mv: cannot stat `libGeoIPUpdate.so.0.0.0': No such file or directory
libtool: install: error: relink `libGeoIPUpdate.la' with the above command before installing it
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/libGeoIP'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/libGeoIP'
make: *** [install-recursive] Error 1
This step has not completed , whats wrong am doing?
Can you please help me out
Thank you
i.e. find and download something like 'mod-geoip.rpm', or some type of .rpm file. drop it on your server and then do something like 'rpm mod-geoip.rpm' or 'urpmi mod-geoip.rpm' or 'apt-get mod-geoip'. None of those will exactly work - you'll need to figure out what the rpm package manager is for your system and what the specific rpm file is for that package.
Doing it through your package manager means you don't have to figure out all those funky make, config, and dependency errors. The package manager and the rpm file should be set up to install everything correctly for your system. Doing it your way isn't.
I asked my hosting company they say OS is Red has Enterprise edition version 2.1
Now what should i do
I made one folder in my html folder and run this command
# rpm -ivh geoip-1.3.17-1.el2.rf.i386.rpm
it just goes to next command prompt nothing shows up , no message is shown
what to do
thanks for your help
here is what i have in install file instructions
(If you get a "libGeoIP.so.1: cannot open shared object file: No such file or
directory" error, add /usr/local/lib to /etc/ld.so.conf then run
/sbin/ldconfig /etc/ld.so.conf )
---------------------------
here is what error i am getting ,is it the same error which the above instruction for install says?
Error i get
/bin/sh ../libtool --mode=install /usr/bin/install -c libGeoIPUpdate.la /usr/local/lib/libGeoIPUpdate.la
libtool: install: warning: relinking `libGeoIPUpdate.la'
(cd /home/ilove/www/geoip/GeoIP-1.4.2/libGeoIP; /bin/sh ../libtool --mode=relink gcc -g -O2 -o libGeoIPUpdate.la -rpath /usr/local/lib GeoIPUpdate.lo md5.lo -lz libGeoIP.la )
mv: cannot stat `libGeoIPUpdate.so.0.0.0': No such file or directory
libtool: install: error: relink `libGeoIPUpdate.la' with the above command before installing it
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/libGeoIP'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/var/www/html/geoip/GeoIP-1.4.2/libGeoIP'
make: *** [install-recursive] Error 1 /usr/local/lib
/lib
/usr/local/php/lib
/usr/local/php/dependencies/lib
/usr/local/lib
/usr/local/lib is already present ,
the install instruction says
-------------------------
(If you get a "libGeoIP.so.1: cannot open shared object file: No such file or
directory" error, add /usr/local/lib to /etc/ld.so.conf then run
/sbin/ldconfig /etc/ld.so.conf )
what does this run command?
how to run this , sorry am not in linux , i have ssh access thanks for your help