This page documents all of the commands that were run in the Installing Graphite from Source screencast. Neither the screencast nor this document are intended to serve as an exhaustive guide for installing or configuring your own Graphite server. Please refer to the official documentation for up-to-date and exhaustive information pertaining to the Graphite project.
This screencast installs Graphite 0.9.10 in a Rackspace Cloud server running Ubuntu 10.04.
All commands are run as root.
apt-get update
apt-get dist-upgrade
apt-get install python-cairo python-django python-django-tagging python-twisted python-zope.interface fontconfig apache2 libapache2-mod-wsgi python-pysqlite2 python-simplejson git-core python-rrdtool
git clone https://github.com/graphite-project/graphite-web.git
git clone https://github.com/graphite-project/carbon.git
git clone https://github.com/graphite-project/whisper.git
cd whisper; git checkout 0.9.10; python setup.py install
cd ../carbon; git checkout 0.9.10; python setup.py install
cd ../graphite-web; python check-dependencies.py; git checkout 0.9.10; python setup.py install
cd /opt/graphite/conf
cp carbon.conf.example carbon.conf
In /opt/graphite/conf/carbon.conf
set USER = carbon
so Carbon doesn't need to run as root.
vi carbon.conf
cp storage-schemas.conf.example storage-schemas.conf
cp graphite.wsgi.example graphite.wsgi
In /opt/graphite/conf/graphite.wsgi
disable the search index settings.
vi graphite.wsgi
cd /etc/apache2/sites-enabled
vi ../sites-available/graphite
Contents of /etc/apache2/sites-available/graphite
:
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
ServerName graphite
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /media/ "/usr/lib/pymodules/python2.6/django/contrib/admin/media/"
<Directory /opt/graphite/conf>
Order allow,deny
Allow from all
</Directory>
<Location />
AuthName "Graphite Server"
AuthType Basic
AuthUserFile /etc/apache2/graphite.htpasswd
<Limit GET>
require valid-user
</Limit>
</Location>
</VirtualHost>
ln -s ../sites-available/graphite
htpasswd -c /etc/apache2/graphite.htpasswd demo
cd ../mods-enabled
ln -s ../mods-available/ssl.conf
ln -s ../mods-available/ssl.load
/etc/init.d/apache2 restart
netstat -vant | grep 443
cd /opt/graphite/webapp/graphite
python manage.py syncdb
chown www-data:www-data /opt/graphite/storage/graphite.db
chown www-data /opt/graphite/storage/
chown -R www-data /opt/graphite/storage/log/
groupadd -g 999 carbon
useradd -c "carbon user" -g 999 -u 999 -s /bin/false carbon
chown -R carbon /opt/graphite/storage/whisper/
/opt/graphite/bin/carbon-cache.py start
chown -R carbon /opt/graphite/storage/log/carbon-cache/
/opt/graphite/bin/carbon-cache.py stop
/opt/graphite/bin/carbon-cache.py start
Any chances you have a development env setup gist as well ? ( for the whole graphite-project stack )