Page:
Graphite Windows
Pages
ActiveMQ
Ajax
AssertJ
BDD
Base Utils
BluePrintCSS(Deprecated)
CXF
Caching
Change4
ChangeLog
CreateNewProject
Crypto
Database
Datasource
DateTime
Design
Dozer
Eclipse
Ehcache
Email
Executable War
Graphite Windows
Graphite
Guava Cache
H2 Database
Hibernate Validator
High Performance Utils
Home
Home4.0
HttpClient
Hystrix
JMeter
JPA
JQuery Validation Plugin
JQuery
JSP
Jaxb
Jersey(Deprecated)
Jetty
Jmx
Json
Log
Logstash
Maven
Memcached
Metrics library
Mock
Monitoring and Metrics
MyBatis
Nodejs
Non Function
Performace test
Profiler
QuickStart
Rate Limiter
Redis
Reflection
ReleaseProcess(Internal)
Schedule
Selenium2
Serialize
Shiro Security
Simulator
SiteMesh
Sonar
Spring Data JPA
Spring MVC
Spring Restful Service
Spring
SpringSide Utils Overview
System Protection
Test Overview
Text
Transaction
Travis CI
Tutorial
Twitter Bootstrap
Unit Test
Validation
YUI Compressor
git
Clone
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
##Install Graphite 0.9.12 on Windows
Reference
- 新版官方安装说明文档(不完整):http://graphite.readthedocs.org/en/latest/install.html
- 旧版官方安装说明:http://graphite.wikidot.com/quickstart-guide
- 民间Windows安装小结: http://www.s2-industries.com/wordpress/blog
1.1 手工下载安装
- 安装Python 2.7 http://www.python.org/download/
- 安装SetupTool和Pip http://www.pip-installer.org/en/latest/installing.html
- 安装Windows版的Twisted 12.3(暂时不要装最新版) https://pypi.python.org/pypi/Twisted/12.3.0
- 安装Windows版的pywin32, http://sourceforge.net/projects/pywin32/files/pywin32/
- 安装Windows版的GTK for Py2Cairo http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/ ,要先用run as administrator 运行cmd,再在cmd里运行它。
- 安装Windows版的Py2cairo http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygtk
1.2 pip 安装
- pip install zope.interface
- pip install Django==1.5 (暂时不要装最新版)
- pip install django-tagging
- pip install pytz
- pip install whisper
- pip install carbon --install-option="--prefix=c:\python27\graphite" --install-option="--install-lib=c:\python27\graphite\lib"
- pip install graphite-web --install-option="--prefix=c:\python27\graphite" --install-option="--install-lib=c:\python27\graphite\webapp"
1.3 后处理
1.配置文件
C:\Python27\graphite\conf 下的storage-schemas.conf.example 和 carbon.conf.example去掉example,
C:\Python27\graphite\webapp\graphite下的local_settings.py.example 去掉example.
2.修改carbon代码,以支持windows
参考了 https://github.com/stephanstapel/carbon ,在springside上做了个更简单的fork https://github.com/springside/carbon/ 修改后的版本,损失了自动记录carbon占用CPU的能力。
可以参考提交记录自行修改,也可以下载下来(版本是0.9.13-SNAPSHOT,不会同步更新),将C:\Python27\graphite\lib\carbon 和 C:\Python27\graphite\examples的内容直接覆盖掉。
3.修改graphite-web 代码,以支持windows
在0.9.12版本上的修改如下:
- 修改webapp\graphite\thirparty\pytz__init_.py 在92行给tz_path赋值 tz_path = 'C:\Python27\Lib\site-packages\pytz\zoneinfo'
- 修改webapp\graphite\storage.py 在153行metric_path = relative_path.replace('/','.')后面加一行metric_path = metric_path.replace('\','.')
在最新版,修改的是finders.py的fs_to_metric()函数
4.初始化用户
c:\Python27\graphite\webapp\graphite>python manage.py syncdb 输入登录用户名,如root/rootroot,保存在内置的sqllite数据库里。
1.4 启动
- 启动Carbon: C:\Python27\graphite\Scripts\carbon-cache.py start
- 启动Web: django-admin.py runserver --pythonpath C:\Python27\graphite\webapp --settings graphite.settings 0.0.0.0:8080
- 启动example-client:C:\Python27\graphite\examples\example-client.py ,真正定时取得CPU数据。