问题:
#nginx启动报错
[root@localhost ~]# /opt/nginx/sbin/nginx
/opt/nginx/sbin/nginx: error while loading shared libraries: libGeoIP.so.1: cannot open shared object file: No such file or directory
[root@localhost ~]# cd /opt/
[root@localhost opt]# wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
[root@localhost opt]# tar zxvf GeoIP.tar.gz
[root@localhost opt]# cd GeoIP-1.4.8/
[root@localhost GeoIP-1.4.8]# ./configure
[root@localhost GeoIP-1.4.8]# make && make install
[root@localhost GeoIP-1.4.8]# /opt/nginx/sbin/nginx -t
/opt/nginx/sbin/nginx: error while loading shared libraries: libGeoIP.so.1: cannot open shared object file: No such file or directory
[root@localhost GeoIP-1.4.8]# locate libGeoIP.so.1
/usr/local/lib/libGeoIP.so.1
/usr/local/lib/libGeoIP.so.1.4.8
[root@localhost GeoIP-1.4.8]# echo "/usr/local/lib" >> /etc/ld.so.conf
[root@localhost GeoIP-1.4.8]# ldconfig
[root@localhost GeoIP-1.4.8]# /opt/nginx/sbin/nginx -t
nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /opt/nginx/conf/nginx.conf test is successful