centos install geoip
sudo pear update-channels
#######
sudo yum install re2c GeoIP GeoIP-data GeoIP-devel
sudo pecl install geoip
vi /etc/php.d/geoip.ini
I also added the following settings in /etc/php.d/geoip.ini:
extension=geoip.so
geoip.custom_directory = /usr/local/share/GeoIP/
重启 php.
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
mv GeoIP.dat /usr/local/share/GeoIP/
1,/var/lib
2,/var/share/
3,/usr/local/share
sudo pear update-channels
#######
sudo yum install re2c GeoIP GeoIP-data GeoIP-devel
sudo pecl install geoip
vi /etc/php.d/geoip.ini
I also added the following settings in /etc/php.d/geoip.ini:
extension=geoip.so
geoip.custom_directory = /usr/local/share/GeoIP/
重启 php.
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
mv GeoIP.dat /usr/local/share/GeoIP/
1,/var/lib
2,/var/share/
3,/usr/local/share
本文详细介绍了在CentOS环境下安装GeoIP库及其相关组件,并在PHP中进行配置的方法,包括下载、解压、设置路径以及修改配置文件等步骤。
1122

被折叠的 条评论
为什么被折叠?



