I just setup a Graphite server on Ubuntu 12.04 (Precise).
Here are some instructions for getting it all working (using Apache as web server).
It follows these steps:
- install system dependencies (apache, django, dev libs, etc)
- install Whisper (db lib)
- install and configure Carbon (data aggregator)
- install Graphite (django webapp)
- configure Apache (http server)
- create initial database
- start Carbon (data aggregator)
Once that is done, you should be able to visit the host in your web browser and see the Graphite UI.
Setup Instructions:
############################# # INSTALL SYSTEM DEPENDENCIES ############################# $ sudo apt-get install apache2 libapache2 libapache2-mod-wsgi / libapache2-mod-python memcached python-dev python-cairo-dev / python-django python-ldap python-memcache python-pysqlite2 / python-pip sqlite3 erlang-os-mon erlang-snmp rabbitmq-server $ sudo pip install django-tagging ################# # INSTALL WHISPER ################# $ sudo pip install http://launchpad.net/graphite/0.9/0.9.9/+download/whisper-0.9.9.tar.gz ################################################ # INSTALL AND CONFIGURE CARBON (data aggregator) ################################################ $ sudo pip install http://launchpad.net/graphite/0.9/0.9.9/+download/carbon-0.9.9.tar.gz $ cd /opt/graphite/conf/ $ sudo cp carbon.conf.example carbon.conf $ sudo cp storage-schemas.conf.example storage-schemas.conf ########################### # INSTALL GRAPHITE (webapp) ########################### $ sudo pip install http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz or $ wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz $ tar -zxvf graphite-web-0.9.9.tar.gz $ mv graphite-web-0.9.9 graphite $ cd graphite $ sudo python check-dependencies.py $ sudo python setup.py install ################## # CONFIGURE APACHE ################## $ cd graphite/examples $ sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/default $ sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi $ sudo mkdir /etc/httpd $ sudo mkdir /etc/httpd/wsgi $ sudo /etc/init.d/apache2 reload ######################### # CREATE INITIAL DATABASE ######################### $ cd /opt/graphite/webapp/graphite/ $ sudo python manage.py syncdb $ sudo chown -R www-data:www-data /opt/graphite/storage/ $ sudo /etc/init.d/apache2 restart $ sudo cp local_settings.py.example local_settings.py ################################ # START CARBON (data aggregator) ################################ $ cd /opt/graphite/ $ sudo ./bin/carbon-cache.py start
Resources:
- http://graphite.readthedocs.org/en/latest/install.html
- http://graphite.wikidot.com/installation
- http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
* works on my machine, Ubuntu 12.04
6 comments:
That was really useful, thank you.
A small remark: in the first step, you write to 'apt-get install libapache2', which is not an existing package.
Hi,
thanks for posting this , it was really helpful.
Two issues I found (on a clean install of Ubuntu 12.04)
1) libapache2 isn't found
2) If you use pip to install graphite-web, the examples folder isn't found for the subsequent step. I had to use the second option, manual install from tar.
Great work!
graphite 0.9.10 is out
In your first command you need backslashes '\' instead of forward-slashes '/' to continue a single line. Thanks for the walkthrough!
Great guide. This should be on the graphite web site.
Post a Comment