Forked from jgeurts/install-graphite-ubuntu-12.04.sh
Last active
December 28, 2015 23:09
-
-
Save dbeckham/7576480 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 | |
#################################### | |
GRAPHITE_VERSION=0.9.12 | |
cd /tmp | |
#################################### | |
# REQUIRED PACKAGES | |
#################################### | |
# primary requirements | |
apt-get install --assume-yes apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 \ | |
libaprutil1 libaprutil1-dbd-sqlite3 build-essential python-dev libapache2-mod-wsgi \ | |
libaprutil1-ldap memcached python-cairo-dev python-django python-ldap python-memcache python-pysqlite2 sqlite3 \ | |
libapache2-mod-python python-pip python-setuptools fontconfig | |
# optional requirements | |
#apt-get install --assume-yes erlang-os-mon erlang-snmp rabbitmq-server bzr expect ssh | |
pip install django-tagging zope.interface twisted txamqp | |
#################################### | |
# DOWNLOAD GRAPHITE COMPONENTS | |
#################################### | |
for project in whisper carbon graphite-web | |
do | |
wget -nv -O ${project}-${GRAPHITE_VERSION}.tar.gz "https://github.com/graphite-project/${project}/archive/${GRAPHITE_VERSION}.tar.gz" && \ | |
tar xzf ${project}-${GRAPHITE_VERSION}.tar.gz && \ | |
mv ${project}-${GRAPHITE_VERSION} ${project} && \ | |
rm ${project}-${GRAPHITE_VERSION}.tar.gz | |
done | |
#################################### | |
# INSTALL WHISPER | |
#################################### | |
cd ~/whisper | |
python setup.py install | |
#################################### | |
# INSTALL CARBON | |
#################################### | |
cd ~/carbon | |
python setup.py install | |
cd /opt/graphite/conf | |
cp carbon.conf.example carbon.conf | |
cp storage-schemas.conf.example storage-schemas.conf | |
gedit storage-schemas.conf | |
### Replace contents of storage-schemas.conf to be the following | |
[stats] | |
priority = 110 | |
pattern = .* | |
retentions = 10:2160,60:10080,600:262974 | |
### | |
#################################### | |
# CONFIGURE GRAPHITE (webapp) | |
#################################### | |
cd ~/graphite | |
python check-dependencies.py | |
python setup.py install | |
# CONFIGURE APACHE | |
################### | |
cd ~/graphite/examples | |
cp example-graphite-vhost.conf /etc/apache2/sites-available/default | |
cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi | |
mkdir /etc/httpd | |
mkdir /etc/httpd/wsgi | |
gedit /etc/apache2/sites-available/default | |
##### | |
# Change the line: WSGISocketPrefix run/wsgi | |
# To: WSGISocketPrefix /etc/httpd/wsgi | |
##### | |
/etc/init.d/apache2 reload | |
#################################### | |
# INITIAL DATABASE CREATION | |
#################################### | |
cd /opt/graphite/webapp/graphite/ | |
python manage.py syncdb | |
# follow prompts to setup django admin user | |
chown -R www-data:www-data /opt/graphite/storage/ | |
/etc/init.d/apache2 restart | |
cd /opt/graphite/webapp/graphite | |
cp local_settings.py.example local_settings.py | |
#################################### | |
# START CARBON | |
#################################### | |
cd /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
I am getting the following error:
Traceback (most recent call last):
File "./carbon-cache.py", line 32, in
run_twistd_plugin(file)
File "/opt/graphite/lib/carbon/util.py", line 90, in run_twistd_plugin
config.parseOptions(twistd_options)
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 614, in parseOptions
usage.Options.parseOptions(self, options)
File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 266, in parseOptions
self.subOptions.parseOptions(rest)
File "/usr/lib/python2.7/dist-packages/twisted/python/usage.py", line 276, in parseOptions
self.postOptions()
File "/opt/graphite/lib/carbon/conf.py", line 225, in postOptions
if whisper.CAN_FALLOCATE:
AttributeError: 'module' object has no attribute 'CAN_FALLOCATE'
Can somebody help?