- Apache 2
sudo apt-get install memcached python-dev python-pip sqlite3 libcairo2 \
libcairo2-dev python-cairo pkg-config
sudo pip install --upgrade distribute
sudo pip install --upgrade pip
cat >> /tmp/graphite_reqs.txt << EOF
django==1.4.5
python-memcached
django-tagging
twisted
whisper
carbon
graphite-web
EOF
sudo pip install -r /tmp/graphite_reqs.txt
cd /opt/graphite/conf/
sudo cp carbon.conf.example carbon.conf
cd /opt/graphite/webapp/graphite/
sudo cp local_settings.py.example local_settings.py
sudo python manage.py syncdb # Follow the prompts, creating a superuser is optional
sudo cp /opt/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite
sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
cd /etc/apache2/sites-enabled
sudo ln -s ../sites-available/graphite .
In /etc/apache2/sites-available/default
, update the line: WSGISocketPrefix run/wsgi
to read:
WSGISocketPrefix /var/run/apache2/wsgi
sudo /etc/init.d/apache2 reload
#!/etc/init/carbon-cache.conf
description "Carbon server"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
umask 022
expect daemon
respawn
pre-start script
test -d /opt/graphite || { stop; exit 0; }
end script
chdir /opt/graphite
exec /opt/graphite/bin/carbon-cache.py start