- OSX Command line tools - You can download it from http://connect.apple.com
- Homebrew http://mxcl.github.io/homebrew/
Before continuing to the installation section. Please make sure that /usr/bin/local
comes before /usr/bin
in your /etc/paths
file.
brew install python
XQuartz is required by cairo
library. If you haven't installed this you can download it from here http://xquartz.macosforge.org/
brew install cairo, py2cairo
** Notes: If your system doesn't have pip
installed. You can install it via sudo easy_install pip
sudo pip install carbon
sudo pip install whisper
sudo pip install django==1.4.5
sudo pip install django-tagging
sudo pip install graphite-web
** Notes: By default pip
will try to download the latest version of the software so this might be a problem in some cases. Graphite has some problem when I tried to install it using latest django 1.5+
. Some people suggests to use 1.4.5
After successfully installed graphite, /opt/graphite/
directory will be created. This will contain graphite-related stuffs.
Update Django's settings.py located at /opt/graphite/webapp/graphite/settings.py
and add the following code at the bottom of the file
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(STORAGE_DIR, 'graphite.db'),
},
}
Then execute these commands.
cd /opt/graphite/webapp/graphite/
python manage.py syncdb
sudo chown -R nobody:nobody /opt/graphite/storage/
cd /opt/graphite/conf
cp storage-schemas.conf.example storage-schemas.conf
cp carbon.conf.example carbon.conf
# Create a bin directory for Graphite
mkdir /opt/graphite/bin
ln -s /usr/local/share/python/run-graphite-devel-server.py /opt/graphite/bin/
ln -s /usr/local/share/python/carbon-cache.py /opt/graphite/bin/
python /opt/graphite/bin/carbon-cache.py start # You can use --debug to enable debugging mode
python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite/
Then open http://localhost:8080
and have fun!
- If you manage to get the server running but have some errors similar to this "Your database file is not writable". Please check your permission on the parent directory (In our case
/opt/graphite/storage/
). It must haswrite
permission. - To check wheter your graphite installation is working or not you can try the example graphite client in
/opt/graphite/example/
by executing this commandpython /opt/graphite/example/example-client.py