Graphite在centeros 6下安装
这段时间,一直在学习Graphite,做一个阶段性总结。
在centos 6.4系统下安装Graphite。
1.在官网中下载安装文件:
链接:https://launchpad.net/graphite/+download/
下载文件:carbon-0.9.10-pre3.tar.gz
graphite-web-0.9.10-pre4.tar.gz
whisper-0.9.10-pre3.tar.gz
check-dependencies.py
2.安装依赖包
yum install -y bitmap bitmap-fonts-compat Django django-tagging fontconfig cairo python-devel python-memcached python-twisted pycairo mod_python python-ldap python-simplejson memcached python-zope-interface mod_wsgi python-sqlite2
后面一些软件的安装可能会用到git:
yum install -y git
3.安装Graphite
首先解压安装包: tar xf carbon-0.9.10-pre3.tar.gz
tar xf graphite-web-0.9.10-pre4.tar.gz
tar xf whisper-0.9.10-pre3.tar.gz
然后进入相应目录,执行setup.py:
cd carbon-0.9.10-pre3
python setup.py install
cd ..
cd graphite-web-0.9.10-pre4
python setup.py install
cd ..
cd whisper-0.9.10-pre3
python setup.py install
graphite默认安装在opt/graphite文件夹下。
4.配置Graphite
首先,确认本机上安装apache。
若未安装,执行 yum install httpd
创建graphite虚拟主机配置:
cat > /etc/httpd/conf.d/graphite.conf
Listen 8080
# You may need to manually edit this file to fit your needs.
# This configuration assumes the default installation prefix
# of /opt/graphite/, if you installed graphite somewhere else
# you will need to change all the occurances of /opt/graphite/
# in this file to your chosen install location.
<VirtualHost *:8080>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
# You will need to create this file! There is a graphite.wsgi.example
# file in this directory that you can safely use, just copy it to graphite.wgsi
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
</Location>
# NOTE: In order for the django admin site media to work you
# must change @DJANGO_ROOT@ to be the path to your django
# installation, which is probably something like:
# /usr/lib/python2.6/site-packages/django
Alias /media/ "/usr/lib/python2.4/site-packages/django/contrib/admin/media/"
<Location "/media/">
SetHandler None
</Location>
# The graphite.wsgi file has to be accessible by apache. It won't
# be visible to clients because of the DocumentRoot though.
<Directory /opt/graphite/conf/>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
配置mod_wsgi模块
在 /etc/httpd/conf.d/wsgi.conf文件中添加以下两行:
LoadModule wsgi_module modules/mod_wsgi.so
WSGISocketPrefix /var/run/wsgi
配置Graphite:
cd /opt/graphite/conf/
for i in graphite.wsgi carbon.conf storage-schemas.conf storage-aggregation.conf; do cp $i.example $i; done
cd /opt/graphite/webapp/graphite/
cp local_settings.py.example local_settings.py
运行以下命令创建数据库:
cd /opt/graphite/webapp/graphite/
python manage.py syncdb
chown -R apache:apache /opt/graphite/
5.启动
service httpd start
/opt/graphite/bin/carbon-cache.py start
在浏览器中使用http://ip:8080
6.实验
运行graphite-web安装包内的examples/example-client.py可以喂数据给graphite:
python example-client.py
对应在浏览器窗口中的显示为在system目录下,loadavg_15min、loadavg_5min、loadavg_1min这三条线就是example-client.py的数据产生的图形。
7.FAQ
我在安装过程中,出现了未安装django的问题:
Traceback (most recent call last): File "manage.py", line 2, in <module> from django.core.management import execute_manager ImportError: No module named django.core.management
提示没有django,手动yum install Django后提示
No package Django available.
遇到这种情况,请手动下载django安装包。
django-tagging可能也会遇到这样的问题,也用这种方法。
在这里分享一个链接,里面是常用的包:http://pan.baidu.com/s/1pJHlzBl
转载于:https://www.cnblogs.com/xinma/p/4152685.html
Graphite在centeros 6下安装相关推荐
- centos7 python3安装numpy_centos 7 下安装numpy、scipy等python包
本文适用于刚入门的小白,欢迎大牛们批评指正. 因为要开始数据分析,而python又不像R和matlab那么简洁.需要安装的包很多~ 网上找了好多牛人博客,想在centos7下安装numpy,scipy ...
- vertica 数据库 linux,CentOS 7下安装vertica记录
CentOS 7下安装vertica记录 1. 安装好centeros 并更新 Centeros安装就不说了,安装完之后联网环境下 yum update.更新下,使得那些包都是新的.(要想用中文 ...
- 在装有Ubuntu16.04的VMware虚拟机下安装OpenCV3.2.0
引言 最近因为学习需要,要在VMware虚拟机下安装OpenCV,在网上查了一下OpenCV3.3.0目前已经出来了,但是考虑到稳定性问题,决定先装一个3.2.0版本的.需要注意的是,pip可以安装的 ...
- Centos7下安装Docker
Centos7下安装Docker(详细的新手装逼教程) 参考: https://www.cnblogs.com/qgc1995/archive/2018/08/29/9553572.html 早就听说 ...
- centos 下安装mysql,linux(Centos7)下安装mysql8.0.18的教程图解
1 获取安装资源包 mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar 提取码: rsif 2 在/usr/local目录下新建目录mysql8 3 将下载的资源包(my ...
- kali linux安装wine32,永恒之蓝msf下 ms17_010 (64位kali下安装wine32)
本次用到的环境: kali(2016.2)32位系统.ip地址:192.168.1.104 目标靶机为:win7sp1x64系统(关闭防火墙),ip地址:192.168.1.105 ========= ...
- win10 mbr下装linux,在Win10下安装Ubuntu 18.04双系统(MBR+Legacy)
刚刚在win10下安装了ubantu18.04系统,亲测有效!中途遇到了很多坑,一一为大家避免 以下就是我安装双系统的详细步骤 BIOS引导方式 目前主要的系统引导方式也有两种:传统的LegacyBI ...
- 在macOS 10.13.6下安装Grafana实录
因为工作原因,需要尽快熟悉和掌握Grafana等工具的使用,所以我就临时在手上这台rMBP上安装了Grafana 6.6.2版本,下面是我的实录,以作备忘. 下载和安装grafana macOS下安装 ...
- ubuntu16.04 下安装Opencv2.4.9
ubuntu16.04 下安装Opencv2.4.9 OpenCV的源码download from: https://sourceforge.net/projects/opencvlibrary/? ...
最新文章
- 低锁单例模式D语言实现
- 周立功:专注的力量成就梦想
- 数据结构--单向链表
- Forever.Sun 从URL地址获取参数
- Highcharts图表-ajax-获取json数据生成图表
- 如果从SVN到GIT
- Android开发16——获取网络资源之基础应用
- python glob模块
- C#序列化出现“因其保护级别而不可访问。只能处理公共类型。”
- 如何使用IDEA格式化JSON数据
- html设置表单禁止修改群名片,如何设置禁止管理员修改qq群名片
- 计算机网络安全技术学习总结
- mysql java配置文件_Mysql配置文件参数优化
- Flink实操 : 算子操作
- 操作系统是如何工作的--------Linux 实验二
- 苹果6现在多少钱_2020年苹果价格多少钱一斤?苹果种植成本利润分析
- 华为OD机试 -众数和中位数(Java) | 机试题+算法思路+考点+代码解析 【2023】
- Quartz定时任务过期处理策略
- 虚拟机工具VMware安装教程
- AndroidApp学习笔记
热门文章
- MySQL alter
- 配置IPsec Tunnel With TACACS+ User Authentication
- android系统tee接口,Android操作系统上的TEE / HSM支持
- python count()计算字符出现的频数
- 最应该看的一本人工智能理论的书-神经网络于深度学习-目录
- App Store上微信的评论地址
- requests+正则爬取猫眼电影前100
- IdentityServer Topics(2)- 定义资源
- 知识星球作业(第5周) - 关于view的知识
- 安装Vertica数据库