graphite


安装yum install graphite-web python-bucky uwsgi-plugin-carbon python-carbon graphite-web-selinux -y

yum search graphite


修改/etc/graphite-web/local_settings.py



#SECRET_KEY = ‘UNSAFE_DEFAULT’

SECRET_KEY = ‘123123'

 #ALLOWED_HOSTS = [ '*’ ]

LLOWED_HOSTS = [ '*’ ]

#TIME_ZONE = 'America/Los_Angeles'

TIME_ZONE = 'Asia/Shanghi’

GRAPHITE_ROOT = '/usr/share/graphite’ #存放web界面

WHISPER_DIR = '/var/lib/carbon/whisper/‘ #存储图文件

RRD_DIR = '/var/lib/carbon/rrd’ #存储图文件



#DATABASES = {

 #    'default': {

#        'NAME': '/opt/graphite/storage/graphite.db',

#        'ENGINE': 'django.db.backends.sqlite3',

 #        'USER': '',

 #        'PASSWORD': '',

 #        'HOST': '',

 #        'PORT': ''

 #    }

 #}



DATABASES = {

     'default': {

         'NAME': '/opt/graphite/storage/graphite.db’,#目录需要创建

         'ENGINE': 'django.db.backends.sqlite3',

       'USER': '',

        'PASSWORD': '',

        'HOST': '',

        'PORT': ''

    }

}



#from graphite.app_settings import *

from graphite.app_settings import *






mkdir -p /opt/graphite/storage/


初始化数据库

django-admin syncdb --settings=local_settings --pythonpath=.


  修改数据文件目录权限为apache

chown apache.apache /opt/graphite/storage/ -R



启动服务

/etc/init.d/carbon-cache restart     端口2003

/etc/init.d/httpd restart


如果出现无法访问  检查django版本


你可能感兴趣的:(graphite)