Created
August 16, 2013 12:26
-
-
Save mughilanand/6249456 to your computer and use it in GitHub Desktop.
Auto Installation Script for Graphite in Debian/Ubuntu based system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################################################## | |
# Script for auto install of graphite in Debian and Ubuntu based system | |
# URL : http://graphite.wikidot.com/installation | |
# Created By Mughil Anand Nainar | |
######################################################################## | |
#################################### | |
# GRPHITE Dependancy Installation | |
#################################### | |
apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson libapache2-mod-python python-setuptools | |
easy_install django-tagging | |
easy_install zope.interface | |
easy_install twisted | |
easy_install txamqp | |
#################################### | |
# INSTALL WHISPER | |
#################################### | |
pip install whisper | |
#################################### | |
# INSTALL CARBON | |
#################################### | |
pip install carbon --install-option="--prefix=/opt/graphite" | |
#################################### | |
# INSTALL GRAPHITE | |
#################################### | |
pip install graphite-web --install-option="--prefix==/opt/graphite" | |
#################################### | |
# GRAPHITE Configuration File | |
#################################### | |
cd /opt/graphite/conf | |
cp carbon.conf.example carbon.conf | |
cp storage-schemas.conf.example storage-schemas.conf | |
cp graphite.wsgi.example graphite.wsgi | |
#################################### | |
# CONFIGURE APACHE | |
#################################### | |
cd /opt/graphite/examples | |
cp example-graphite-vhost.conf /etc/apache2/sites-available/default | |
mkdir -p /etc/httpd/wsgi | |
cd /etc/apache2/sites-available | |
sed -i "s;WSGISocketPrefix run/wsgi;WSGISocketPrefix /etc/httpd/wsgi;g" default | |
/etc/init.d/apache2 reload | |
#################################### | |
# INITIAL DATABASE CREATION | |
#################################### | |
cd /opt/graphite/webapp/graphite/ | |
python manage.py syncdb | |
# follow prompts to setup django admin user | |
sudo chown -R www-data:www-data /opt/graphite/storage/ | |
/etc/init.d/apache2 restart | |
cd /opt/graphite/webapp/graphite | |
sudo cp local_settings.py.example local_settings.py | |
#################################### | |
# START CARBON | |
#################################### | |
/opt/graphite/bin/carbon-cache.py start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment