cd /opt
sudo mkdir graphite
sudo chown `logname` graphite
virtualenv --distribute graphite
cd /opt/graphite
source bin/activate
Install cairo and py2cairo using brew
brew install cairo --without-x
brew install py2cairo --without-x
Since homebrew installs py2cairo in a global site-package, we need to link it in our env
ln -s /usr/local/lib/python2.7/site-packages/cairo /opt/graphite/lib/python2.7/site-packages/cairo
The other packages can be installed with pip
pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web
Create a /opt/graphite/webapp/graphite/local_settings.py
file and add this config
DEBUG = True
DATABASES = {
'default': {
'NAME': '/opt/graphite/storage/graphite.db',
'ENGINE': 'django.db.backends.sqlite3',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
}
}
Run syncdb to create the database
cd /opt/graphite/webapp/graphite
python manage.py syncdb
cd /opt/graphite/conf
cp storage-schemas.conf.example storage-schemas.conf
cp carbon.conf.example carbon.conf
python bin/carbon-cache.py start
python bin/run-graphite-devel-server.py /opt/graphite
Now open http://localhost:8080/ If it works correclty you should see a black image with "No Data" in the Graphite Composer. If you see a broken image, it's probably something to do with py2cairo and cairo.
I had to edit
SECRET_KEY
inside/opt/graphite/webapp/graphite/app_settings.py
before runningpython manage.py syncdb