Skip to content

Instantly share code, notes, and snippets.

@mariovisic
Forked from caged/graphite.md
Created September 24, 2012 01:09
Show Gist options
  • Save mariovisic/3773685 to your computer and use it in GitHub Desktop.
Save mariovisic/3773685 to your computer and use it in GitHub Desktop.
Installing Graphite on OS X Lion

This worked for me on OSX Mountain Lion. Please fork and fix if you find an error.

Ensure homebrew has a good bill of health

brew doctor

Install X11 for OSX

http://xquartz.macosforge.org/trac/wiki/X112.7.3

Install Cairo

brew install cairo py2cairo

Install pip

sudo easy_install pip

Install Graphite and Dependencies

sudo pip install carbon
sudo pip install whisper
sudo pip install django
sudo pip install django-tagging
sudo pip install graphite-web

Create default database

cd /opt/graphite/webapp/graphite
sudo python manage.py syncdb
sudo chown -R nobody:nobody /opt/graphite/storage/

Move example configs

cd /opt/graphite/conf
sudo cp storage-schemas.conf.example storage-schemas.conf
sudo cp carbon.conf.example carbon.conf

Carbon scripts are installed in /usr/local/share/python. Need to symlink

mkdir /opt/graphite/bin
sudo ln -s /usr/local/share/python/carbon-cache /opt/graphite/bin

Start carbon

sudo /opt/graphite/bin/carbon-cache.py start

Start Graphite

sudo PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite/

Hope like hell it works

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment