wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# tar XZVF GeoIP.tar.gz
# CD GeoIP-1.4.8
#./configure
# Make && make install
# nginx-t
Nginx:error while loading shared libraries:libgeoip.so.1:cannot open Shared object file:no such file or directory
# Locate Libgeoip.so.1
-bash:locate:command not found
Yum-y Install Mlocate
-------------------------------
# Locate Libgeoip.so.1
Locate:can not stat () '/var/lib/mlocate/mlocate.db ': No such file or directory
UpdateDB
-------------------------------
# Locate Libgeoip.so.1
/root/geoip-1.4.8/libgeoip/.libs/libgeoip.so.1
/root/geoip-1.4.8/libgeoip/.libs/libgeoip.so.1.4.8
/usr/local/lib/libgeoip.so.1
/usr/local/lib/libgeoip.so.1.4.8
# echo "/usr/local/lib" >>/etc/ld.so.conf
# Ldconfig
# nginx-t
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful
This article is from the "Square Hill" blog, please be sure to keep this source http://63638790.blog.51cto.com/513514/1650407
Nginx:error while loading shared libraries:libgeoip.so.1