- Introduction
- Quick Start
- Design
- Tutorial
- Spring MVC
- JSP/JSTL/Servlet
- JQuery and plugins
- Ajax
- Twitter Bootstrap CSS
- SiteMesh
- YUICompressor
- Spring Restful Service
- JAX-WS/CXF
- Spring Data JPA
- JPA/Hibernate
- MyBatis
- Database
- H2 Database
- Datasource
- Transaction
- Redis
- Cache Overview
- Guava Cache
- Ehcache
- Memcached
- Shiro Security
- Crypto
- Schedule/Quartz
- Jmx
- System Protection
- Hystrix
- Rate Limiter
- Monitoring and Metrics
- Metrics-library
- Graphite
- Logging/Slf4j/Logback
- Logstash
- Spring
- Validation Overview
- JQuery Validation
- Hibernate Validator
- General Utilizes
- JSON/JAXB
- Date
- Test Overview
- Unit Test/Mockito/AssertJ
- Selenium2
- BDD
- Performace-test
- JMeter
- Profiler
- Simulator Overview
- Nodejs
- Eclipse
- Maven
- Sonar
- git
- Travis CI
- Jetty
- Micro-Service Architecture/Executable War
- AssertJ
- CreateNewProject
- Dozer
- Graphite-Windows
- Hello-Everybody
- Jaxb
- Json
- Mock
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
Graphite-Windows
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/
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数据。
1.5 查看
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论