自动更新GeoIP数据库
2017-05-12 19:59
691 查看
#!/bin/bash if [ ! -d /usr/local/share/GeoIP ];then mkdir /usr/local/share/GeoIP fi if [ ! -d /usr/local/share/qqIP ];then mkdir /usr/local/share/qqIP fi wget -t 5 -O /tmp/GeoIP.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget -t 5 -O /tmp/GeoLiteCity.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz wget -t 5 -O /tmp/GeoIPASNum.dat.gz http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz gzip -df /tmp/GeoIP.dat.gz gzip -df /tmp/GeoLiteCity.dat.gz gzip -df /tmp/GeoIPASNum.dat.gz mv -f /tmp/Geo*.dat /usr/local/share/GeoIP/
脚本名可任意取,比如update_geoip.sh,然后添加定时任务,每隔5天执行一次。
相关文章推荐
- GeoIP数据库自动更新
- 将DataSet更新自动提交到数据库工具类实现
- 根据数据库自动生成INSERT/UPDATE更新语句
- 转载文章:Windows Azure 七月份更新:SQL 数据库、流量管理器、自动伸缩、虚拟机
- WPF非轮询方式更新数据库变化SqlDependency(数据库修改前台自动更新)
- 数据库选项--自动更新统计
- 将DataSet更新自动提交到数据库工具类实现
- Spring根据配置,自动更新数据库表。
- shell 记录apache status并自动更新到数据库
- shell 记录apache status并自动更新到数据库
- EF修改model自动更新数据库
- 自动记录数据库存储过程的更新和改变,并产生日志
- SQL SERVER 2005 数据库对比工具,并自动生成更新SQL脚本
- 使用DataAdpater自动批量更新DataSet中的数据到数据库
- 转载文章:Windows Azure 七月份更新:SQL 数据库、流量管理器、自动伸缩、虚拟机
- 将DataSet更新自动提交到数据库工具类实现(转)
- 自动批量更新DataSet中的数据到数据库
- 自动备份网站文件和数据库上传到FTP空间(10月7日更新)
- 转载文章:Windows Azure 七月份更新:SQL 数据库、流量管理器、自动伸缩、虚拟机
- Datagridview实现自动更新到数据库