安装指令如下所示,跟着步骤一步一步执行即可。使用root权限,如果不是的话,请根据情况加上sudo权限命令。
cd /tmp
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar -zxvf GeoIP.tar.gz
cd GeoIP-1.4.8
./configure
make
make install
##-------Index the library into the system with ldconfig----
echo '/usr/local/lib' > /etc/ld.so.conf.d/geoip.conf
ldconfig