Ubuntu14.04下安装graphite
2015-07-31 10:29
260 查看
参考文章:
http://www.vpsee.com/2012/05/install-graphite-on-ubuntu-12-04/
确保服务器上安装了python大于2.4版本
安装必要软件包:
安装python的安装包管理程序 pip及其他必要软件包
用pip安装以下三个
pip install carbon
pip install whisper
pip install graphite-web
初始化配置,直接用 example 文件里的默认配置就可以:
修改 apache 配置,增加一个 vhost 或者偷懒下载一个配置文件覆盖
sockets 最好不要放在
pip install parse_lookup
如果出现提示No distributions at all found for parse-lookup
则是因为django最新的改动,django.db.models.query包中已不含parse_lookup方法,
I believe the error is due to the django-tagging package missing. Even so, Django 1.4 was just released two weeks ago and Graphite hasn’t yet made the changes yet to be compatible with it (see https://bugs.launchpad.net/graphite/+bug/963684) so I’d suggest starting with Django 1.3 as you’ll run into other issues otherwise.
解决方法:不要使用项目组提供的打包文件,用源码安装:
先卸载之前安装的djongo-tagging:pip uninstall tagging
从 https://code.google.com/p/django-tagging/downloads/list 下载最新的django-tagging安装,安装命令:进入解压目录, python setup.py install
初始化 graphite 需要的数据库,修改
启动 carbon:
浏览器访问 IP 地址(127.0.0.1)后就可以看到 graphite web 界面:
http://www.vpsee.com/2012/05/install-graphite-on-ubuntu-12-04/
确保服务器上安装了python大于2.4版本
安装必要软件包:
安装python的安装包管理程序 pip及其他必要软件包
$ apt-get install python-pip $ sudo pip install Django==1.5.2 $ sudo pip install tagging $ sudo apt-get install apache2 libapache2-mod-wsgi \ python-twisted python-cairo python-django-tagging
用pip安装以下三个
graphite组件
whisper(简单的存放和操作数据的库),
carbon(监控数据的
Twisted守护进程) 和
graphite-web(Django webapp)
pip install carbon
pip install whisper
pip install graphite-web
初始化配置,直接用 example 文件里的默认配置就可以:
$ cd /opt/graphite/conf/ $ sudo cp carbon.conf.example carbon.conf $ sudo cp storage-schemas.conf.example storage-schemas.conf $ sudo cp graphite.wsgi.example graphite.wsgi
修改 apache 配置,增加一个 vhost 或者偷懒下载一个配置文件覆盖
000-default.conf,覆盖后需要重新 reload 配置:
$ wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz $ tar -zxvf graphite-web-0.9.9.tar.gz $ cd graphite-web-0.9.9 $ sudo cp examples/example-graphite-vhost.conf /etc/apache2/sites-available/000-default.conf #这里注意与Ubuntu12.04的配置不同,Ubuntu12.04修改如下 $ sudo cp examples/example-graphite-vhost.conf /etc/apache2/sites-available/default
sockets 最好不要放在
/etc/httpd/下面(不同 Linux 发行版本对不同目录的权限问题很混淆人),ubuntu 版本可以放在
/var/run/apache2下,所以修改 000-default 文件里的
WSGISocketPrefix部分:
$ sudo vi /etc/apache2/sites-available/000-default ... WSGISocketPrefix /var/run/apache2/wsgi ... $ sudo /etc/init.d/apache2 reload
pip install parse_lookup
如果出现提示No distributions at all found for parse-lookup
则是因为django最新的改动,django.db.models.query包中已不含parse_lookup方法,
I believe the error is due to the django-tagging package missing. Even so, Django 1.4 was just released two weeks ago and Graphite hasn’t yet made the changes yet to be compatible with it (see https://bugs.launchpad.net/graphite/+bug/963684) so I’d suggest starting with Django 1.3 as you’ll run into other issues otherwise.
解决方法:不要使用项目组提供的打包文件,用源码安装:
先卸载之前安装的djongo-tagging:pip uninstall tagging
从 https://code.google.com/p/django-tagging/downloads/list 下载最新的django-tagging安装,安装命令:进入解压目录, python setup.py install
初始化 graphite 需要的数据库,修改
storage的权限,用拷贝的方式创建
local_settings.py文件:
$ cd /opt/graphite/webapp/graphite/ $ sudo python manage.py syncdb $ sudo chown -R www-data:www-data /opt/graphite/storage/ $ sudo cp local_settings.py.example local_settings.py $ sudo /etc/init.d/apache2 restart
启动 carbon:
$ cd /opt/graphite/ $ sudo ./bin/carbon-cache.py start
浏览器访问 IP 地址(127.0.0.1)后就可以看到 graphite web 界面:
相关文章推荐
- 怎么把表格从pdf格式转成excel
- linux下发现可疑用户时处理办法
- HDU 5319_Painter
- 如何在Android NDK中调用第三方库文件(.so)
- 初识volatite
- 判断是否为节假日和一天是否为周末
- 2015多校第三场第二题RGCDQ
- Java 内存与堆栈
- SPOJ UMR 10A 计算几何
- django 中间件记录所有请求及请求执行时间
- [转]spring4.x注解概述
- linux普通用户使用root权限
- asp.net WebApi不能接收到Put和Delete请求,试图发送Put和Delete请求时得到405异常
- 能量英语在七月
- iOS- UITableViewCell重用
- 项目不能够加入tomact
- 第一次接触javaweb的新手认识
- 从事智能家居行业的企业(Top 45家)
- 理解TCP为什么需要进行三次握手
- android库工程jar打包和混淆