Follow these steps to install graphite on OS X Lion.
- Python 2.7
- Brew
- Git
brew install cairo
Clone the repo:
git clone git://git.cairographics.org/git/py2cairo
cd py2cairo
We need to set up a bunch of environment variables:
export PYTHONPATH='/System/Library/Frameworks/Python.framework/Versions/2.7'
export LD_LIBRARY_PATH='$PYTHONPATH/:$PYTHONPATH/lib/:$LD_LIBRARY_PATH'
export LINKFLAGS='-search_dylibs_first -L /System/Library/Frameworks/Python.framework/Versions/2.7/lib/'
export ARCHFLAGS='-arch x86_64'
export CC='/usr/bin/gcc'
export PKG_CONFIG_PATH='/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/'
Then we can proceed with the installation:
python waf clean
python waf configure --prefix=$PYTHONPATH
python waf build
python waf install
pip install django
pip install django-tagging
pip install carbon
pip install whisper
pip install graphite-web
cp /opt/graphite/conf/carbon.conf{.example,}
cp /opt/graphite/conf/storage-schemas.conf{.example,}
cd /opt/graphite/webapp/graphite
# Modify this file to change database backend (default is sqlite).
cp local_settings.py{.example,}
# Initialize database
python manage.py syncdb
python /opt/graphite/bin/carbon-cache.py start
python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite
Go to:
http://localhost:8080
You should see this if it works properly:
If you get a broken image, it most likely means that something is wrong py2cairo and cairo.
Check the debug output here:
http://localhost:8080/render
FYI..
My cairo installation was failing on with "brew install cairo".
Solved it by using : "brew install cairo --use-clang"