Forked from jgeurts/install-graphite-ubuntu-12.04.sh
Last active
August 29, 2015 14:02
-
-
Save wjlafrance/36ac69a9a011b65c9302 to your computer and use it in GitHub Desktop.
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
#################################### | |
# 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 | |
#################################### | |
# Incomplete list of packages used | |
sudo apt-get install --assume-yes \ | |
python-django-tagging python-ldap python-memcache python-txamqp \ | |
libapache2-mod-wsgi | |
#################################### | |
# Download packages from Launchpad | |
#################################### | |
mkdir graphite-install && cd graphite-install | |
wget https://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.10.tar.gz | |
wget https://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz | |
wget https://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz | |
tar xvzf graphite-web-*.tar.gz | |
tar xvzf carbon-*.tar.gz | |
tar xvzf whisper-*.tar.gz | |
rm *.tar.gz | |
mv graphite{-web-*,} | |
mv carbon{-*,} | |
mv whisper{-*,} | |
# $ ls | |
# carbon graphite whisper | |
#################################### | |
# INSTALL WHISPER | |
#################################### | |
pushd whisper | |
sudo python setup.py install | |
popd | |
#################################### | |
# INSTALL CARBON | |
#################################### | |
pushd carbon | |
sudo python setup.py install | |
popd | |
pushd /opt/graphite/conf | |
sudo cp sudo cp carbon.conf{.example,} | |
sudo cp sudo cp storage-schemas.conf{.example,} | |
sudo vim storage-schemas.conf | |
### Replace contents of storage-schemas.conf to be the following | |
[stats] | |
priority = 110 | |
pattern = .* | |
retentions = 10:2160,60:10080,600:262974 | |
### | |
popd | |
#################################### | |
# CONFIGURE GRAPHITE (webapp) | |
#################################### | |
pushd graphite | |
sudo python check-dependencies.py | |
sudo python setup.py install | |
popd | |
#################################### | |
# CONFIGURE APACHE | |
#################################### | |
sudo cp /opt/graphite/conf/graphite.wsgi{.example,} | |
sudo mkdir -p /var/apache2/wsgi | |
pushd /etc/apache2 | |
sudo cp graphite/examples/example-graphite-vhost.conf sites-available/graphite.conf | |
sudo vim sites-available/graphite.conf | |
##### | |
# Change the line: WSGISocketPrefix run/wsgi | |
# To: WSGISocketPrefix /etc/apache2/wsgi | |
# Replace: <VirtualHost *:80> | |
# With: <VirtualHost *:83> | |
##### | |
sudo vim ports.conf | |
##### | |
# Below: Listen 80 | |
# Add: Listen 83 | |
##### | |
cd sites-enabled | |
sudo ln -s ../sites-available/graphite.conf | |
popd | |
sudo service apache2 restart | |
#################################### | |
# INITIAL DATABASE CREATION | |
#################################### | |
cd /opt/graphite/webapp/graphite/ | |
sudo python manage.py syncdb | |
# follow prompts to setup django admin user | |
sudo chown -R www-data:www-data /opt/graphite/storage/ | |
sudo service apache2 restart | |
cd /opt/graphite/webapp/graphite | |
sudo cp local_settings.py.example local_settings.py | |
#################################### | |
# START CARBON | |
#################################### | |
sudo /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