mac使用influxdb和grafana

mac使用influxdb和grafana

influxdb安装以及配置

brew update
brew install influxdb
ln -sfv /usr/local/opt/influxdb/*.plist ~/Library/LaunchAgents

# 配置文件在/etc/influxdb/influxdb.conf ,如果没有就将/usr/local/etc/influxdb.conf 拷一个过去
配置缓存:cache-max-memory-size

#启动服务
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.influxdb.plist

#停止服务
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.influxdb.plist

#前台启动
influxd -config /usr/local/etc/influxdb.conf

查看influxdb运行配置
influxd config

安装

如果没有安装过

brew update
brew install grafana

如果安装了现在需要升级

brew update
brew reinstall grafana

运行

brew services start grafana

停止

brew services stop grafana

浏览器打开

输入http://127.0.0.1:3000即可打开其画面,默认登陆用户名,密码admin/admin

编写爬虫代码

-- 爬虫使用的 MongoDB 的 database 名称为 spider_data;
-- 爬虫使用的 MongoDB 的 table 名称为 qsbk;
posted @ 2018-12-01 23:40  公众号python学习开发  阅读(2031)  评论(0编辑  收藏  举报