CentOS 为 Apache 安装GeoIP 支持
- 安装GeoIP
yum install GeoIP GeoIP-devel GeoIP-data zlib-devel
- 下载最新的IP数据
mkdir /usr/local/share/GeoIP cd /usr/local/share/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gunzip GeoIP.dat.gz gunzip GeoLiteCity.dat.gz
- 安装 mod_geoip
yum install mod_geoip
- 修改apache配置
<IfModule mod_geoip.c> GeoIPEnable On GeoIPDBFile /usr/local/share/GeoIP/GeoIP.dat Standard GeoIPDBFile /usr/local/share/GeoIP/GeoLiteCity.dat Standard </IfModule>
5.检查
phpinfo();
相关推荐
鲁氏汤包王 2020-01-09
zrtlin 2019-08-31
liuchen0 2019-08-30
hwhanwan 2011-06-30
Wenjing 2017-07-18
superyu 2011-04-13
liyingjie0 2011-08-10
chenchuanwen 2011-11-28
cullinans 2019-06-26
liuyaping 2009-04-27
subnetwork 2015-05-14
87497001 2014-03-28
linuxvfast 2014-01-19
Xinspace 2012-11-10
HatsuneMiku 2017-09-28
思考的稻草人 2017-08-12
andyzhaojianhui 2016-01-14
Movenow 2014-06-17
聚指尖 2013-06-14