个人娱乐之Maptail的安装

摘要

maptail的原理是基于node.js, 通过调用WEB服务器访问日志实时打印访问信息.
注:下面node是基于源码编译安装.并依赖python2.6~2.7版本,如果python是2.6以上版本无需再安装.
maptail:https://github.com/stagas/maptail/

yum install npm -y
npm install maptail -g
cd /usr/local
git clone https://github.com/stagas/maptail.git
echo "export PATH=/usr/local/maptail/bin:\$PATH" > /etc/profile.d/maptail.sh
. /etc/profile.d/maptail.sh
cd /usr/local/maptail/bin
npm install geoip-lite
npm install express
npm install simpl
sed -ri 's/(geoip-lite)-with-city-data/\1/' /usr/local/maptail/lib/maptail.js
echo 'nohup tail -fn 20 www.dwhd.org_nginx.log | maptail -h 0.0.0.0 -p 65500 &' >> /etc/rc.local
nohup tail -fn 20 www.dwhd.org_nginx.log | maptail -h 0.0.0.0 -p 65500 &

展示效果http://www.dwhd.org:65500/
个人娱乐之Maptail的安装

  • 本文由 发表于 2015年6月12日12:33:16
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: