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

相关文章:

  • 2021-04-04
  • 2021-09-29
  • 2021-08-29
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
猜你喜欢
  • 2021-05-15
  • 2021-10-11
  • 2021-10-04
  • 2021-06-24
  • 2021-07-04
相关资源
相似解决方案