在 CentOS 5.8 上安装 Graphite
标签(空格分隔): 监控 monitor CentOS 5.8 Graphite
首先说一句,在 CentOS 5.8 上安装真的很坑爹。。。
基础环境
- 操作系统内核
uname -a
Linux cloud-test-slave-001 2.6.18-308.el5 #1 SMP Tue Feb 21 20:06:06 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
- 操作系统版本
[root@cloud-test-slave-001 ~]# cat /etc/redhat-release
CentOS release 5.8 (Final)
- Python 版本
[root@cloud-test-slave-001 ~]# python --version
Python 2.7
必备软件
按照 Graphite 官方文档的要求,需要如下软件:
python2.4 或者更高版本(必选)【建议 2.6 或 2.7 版本】
pycairo (需要 PNG 包支持,即 libpng)(必选)
mod_python(必选)
django(必选,需要 django 1.4 版本,为什么必须 django 1.4 在后面会说明)
python-ldap (可选 - needed for ldap-based webapp authentication)
python-memcached (可选 - needed for webapp caching, big performance boost)
python-sqlite2 (可选 - a django-supported database module is required)
bitmap and bitmap-fonts required on some systems, 尤其是在 Red Hat 系统上
下面是我目前安装的一些涉及到的软件的版本(可能有多余的,是因为我在虚拟环境安装,没有安装好,只好混装,所以拉出来的有点多)
执行命令 pip freeze
拉出如下清单:
Django==1.4
Dozer==0.4
Jinja2==2.7.3
MarkupSafe==0.23
PyYAML==3.10
SQLAlchemy==0.9.7
Twisted==14.0.2
WebOb==1.4
Werkzeug==0.9.6
alembic==0.6.5
configobj==5.0.6
croniter==0.3.3
cssselect==0.9.1
daemonize==2.3.1
dagobah==0.2.3
distribute==0.6.49
django-filter==0.7
django-tagging==0.3.1
lxml==3.3.5
micawber==0.3.0
paramiko==1.11.0
peewee==2.2.5
premailer==1.13
pycrypto==2.6.1
pysqlite==2.6.3
python-dateutil==2.2
python-memcached==1.53
txAMQP==0.6.2
uWSGI==2.0.7
virtualenv==1.11.6
whisper==0.9.12
wsgiref==0.1.2
zope.interface==4.1.1
开始安装
-
安装 yum EPEL 源
wget "http://mirrors.ustc.edu.cn/fedora/epel/5/i386/epel-release-5-4.noarch.rpm" rpm -Uvh epel-release-5-4.noarch.rpm
-
安装依赖包
yum install gcc bitmap bitmap-fonts zope
yum install openldap openldap24-libs openldap-clients openldap-devel openssl-devel
pip install pyOpenSSL python-memcached pycrypto python-ldap pysqlite uwsgi nginx
注:因为我这个目前是测试,所以 nginx 就直接 yum 安装了,版本比较低,只有 0.8,如果是生产,建议源码安装最新的稳定版本。
pip install django==1.4
安装 django-tagging ,默认的
pip install tagging
的这个不行,版本是 0.2.1 ,会报错。pip install django-tagging==0.3.1 或 pip install tagging==0.3.1
如果上面这个方法