Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz
wget http://launchpad.net/graphite/0.9/0.9.9/+download/carbon-0.9.9.tar.gz
wget http://launchpad.net/graphite/0.9/0.9.9/+download/whisper-0.9.9.tar.gz
tar -zxvf graphite-web-0.9.9.tar.gz
tar -zxvf carbon-0.9.9.tar.gz
tar -zxvf whisper-0.9.9.tar.gz
mv graphite-web-0.9.9 graphite
mv carbon-0.9.9 carbon
mv whisper-0.9.9 whisper
rm carbon-0.9.9.tar.gz
rm graphite-web-0.9.9.tar.gz
rm whisper-0.9.9.tar.gz
sudo apt-get install --assume-yes apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 python3.1 libpython3.1 python3.1-minimal libapache2-mod-wsgi libaprutil1-ldap memcached python-cairo-dev python-django python-ldap python-memcache python-pysqlite2 sqlite3 erlang-os-mon erlang-snmp rabbitmq-server bzr expect ssh libapache2-mod-python python-setuptools
sudo easy_install django-tagging
####################################
# INSTALL WHISPER
####################################
cd ~/whisper
sudo python setup.py install
####################################
# INSTALL CARBON
####################################
cd ~/carbon
sudo python setup.py install
# CONFIGURE CARBON
####################
cd /opt/graphite/conf
sudo cp carbon.conf.example carbon.conf
sudo cp storage-schemas.conf.example storage-schemas.conf
sudo vim storage-schemas.conf
### edited storage-schemas.conf to be the following
[stats]
priority = 110
pattern = .*
retentions = 10:2160,60:10080,600:262974
###
####################################
# CONFIGURE GRAPHITE (webapp)
####################################
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 vim /etc/apache2/sites-available/default
# moved 'WSGIImportScript /opt/gr..' to right before virtual host since it gave me an error saying
# WSGIImportScript cannot occur within <VirtualHost> section
# if this path does not exist make it!!!!!!
# /etc/httpd/wsgi
sudo mkdir /etc/httpd
sudo mkdir /etc/httpd/wsgi
sudo /etc/init.d/apache2 reload
####################################
# INITIAL DATABASE CREATION
####################################
cd /opt/graphite/webapp/graphite/
sudo cp local_settings.py.example local_settings.py
sudo python manage.py syncdb
# follow prompts to setup django admin user
sudo chown -R www-data:www-data /opt/graphite/storage/
sudo /etc/init.d/apache2 restart
####################################
# START CARBON
####################################
cd /opt/graphite/
sudo ./bin/carbon-cache.py start
####################################
# SEND DATA TO GRAPHITE
####################################
cd ~/graphite/examples
sudo chmod +x example-client.py
# [optional] edit example-client.py to report data faster
# sudo vim example-client.py
sudo ./example-client.py
@MikeGrace

This comment has been minimized.

Copy link
Owner Author

MikeGrace commented Sep 12, 2011

@MikeGrace

This comment has been minimized.

Copy link
Owner Author

MikeGrace commented Oct 13, 2011

Now updated to work with version 0.9.9!

@michielb

This comment has been minimized.

Copy link

michielb commented Nov 6, 2011

To solve the dependencies for graphite, I had to add:

sudo apt-get install python-django-tagging
sudo apt-get install python-twisted

Still had a warning about txamqp not being installed.

@nictuku

This comment has been minimized.

Copy link

nictuku commented Mar 10, 2012

Thanks for this.

@asafjaffi

This comment has been minimized.

Copy link

asafjaffi commented May 10, 2012

Still had a warning about txamqp not being installed.

Same. Is this an issue?

@xkilian

This comment has been minimized.

Copy link

xkilian commented Jun 9, 2012

amqp is an optional component for graphite. It is used for data acquisition. Typically data is received via pickle or raw socket.

@xkilian

This comment has been minimized.

Copy link

xkilian commented Jun 9, 2012

Would be nice to update this installation for 0.9.10.

@josephmisiti

This comment has been minimized.

Copy link

josephmisiti commented Nov 16, 2012

i had to add

git clone git://github.com/graphite-project/ceres.git
cd ceres/
sudo python setup.py install

to get this working on ubuntu 11.10

@himlohiya

This comment has been minimized.

Copy link

himlohiya commented Oct 26, 2013

while running the same on vagrant for Ubuntu 12.04 faced the problem where had to change the owner for the files to apache

Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module.
If you see this error, make sure that apache owns the directory

Fix :
sudo chown -R www-data:www-data /opt/graphite

@zanella

This comment has been minimized.

Copy link

zanella commented Jan 23, 2014

To install the 0.9.9 version make sure you're using django 1.3.1

@rflopsy

This comment has been minimized.

Copy link

rflopsy commented Dec 10, 2014

I have started apache and carbon but not getting any GUI from my browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.