geoiplookup命令没有任何输出问题
来源:互联网 发布:陈忠徐紫砂壶淘宝假货 编辑:程序博客网 时间:2024/05/21 12:51
在Ubuntu上使用命令 apt-get install geoip-bin安装后,使用geoiplookup 8.8.8.8没有任何输出。
问题原因:缺少数据库,在/usr/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
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoIPASNum.dat.gz
gunzip GeoLiteCity.dat.gz
sudo cp GeoIP.dat GeoIPASNum.dat GeoLiteCity.dat /usr/share/GeoIP/
然后再执行就可以了
root@localhost:~/geoip# geoiplookup 112.95.16.94
GeoIP Country Edition: CN, China
GeoIP ASNum Edition: AS17623 China Unicom Shenzen network
如果要显示城市信息,需要指定参数
root@localhost:~/geoip# geoiplookup 112.95.16.94 -f /usr/share/GeoIP/GeoLiteCity.dat
GeoIP City Edition, Rev 1: CN, 30, Guangdong, Shenzhen, N/A, 22.533300, 114.133301, 0, 0
阅读全文
0 0
- geoiplookup命令没有任何输出问题
- myEclipse 中使用maven命令 Tomcat:run没有任何反应,控制台console也没有输出任何语句
- 为什么Runtime.exec("ls")没有任何输出?
- 为什么Runtime.exec("ls")没有任何输出?
- Ajax页面没有输出任何提示的处理办法
- ionic build ios 没有任何输出和响应
- gsoap没有输出参数问题
- gsoap没有输出参数问题
- rt_kprintf没有输出的问题
- pb11.5 web开发 - treeview的使用没有任何问题
- ubuntu删除mysql重装mysql亲测没有任何问题
- MySQL安装过程中,使用net start mysql命令,出现 服务正在启动 服务无法启动 服务没有报告任何错误 的问题
- 没有任何借口
- 没有任何借口!
- 没有任何借口
- 没有任何借口
- 没有任何借口
- 没有任何借口
- 剑指Offer-38
- Linux下安装Git
- final、static、const 的含义
- win shell和macos shell脚本实例
- 【建模必备】遗传算法的基本原理与步骤(交叉)
- geoiplookup命令没有任何输出问题
- Java程序控制语句
- 百度地图Marker隐藏/显示
- IO流中write()和writeShort()的小坑
- QTimer::singleShot()函数使用
- PHP面试题整理
- js判断识别微信或QQ浏览器
- JNI笔记 C访问Java构造方法,父类方法,中文乱码,C向Java中传入数组
- 四大机器学习降维算法:PCA、LDA、LLE、Laplacian Eigenmaps