-
-
Save lonefreak/3497694 to your computer and use it in GitHub Desktop.
Install Graphite 0.9.9 on Centos 6
This file contains 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/sh | |
# FOR CENTOS 6 | |
# Andrew Diller Jan 2012 | |
# Modified by Fabricio Leotti Aug 2012 | |
# Get EPEL Repo installed | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm | |
# Comment all "mirrorlist=" lines in /etc/yum.repos.d/epel.repo | |
sed -i s/^mirrorlist=/#mirrorlist=/g /etc/yum.repos.d/epel.repo | |
# Uncomment all "baseurl=" lines in /etc/yum.repos.d/epel.repo | |
sed -i s/^#baseurl=/baseurl=/g /etc/yum.repos.d/epel.repo | |
# Installing dependencies | |
yum install -y pycairo mod_python Django python-ldap python-memcached python-sqlite2 bitmap bitmap-fonts python-devel python-crypto pyOpenSSL gcc python-zope-filesystem python-zope-interface git gcc-c++ zlib-static | |
# Install easy_install for Python 2.6 | |
wget 'http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086' | |
sh ./setuptools-0.6c11-py2.6.egg | |
# Install more dependencies | |
sudo easy_install django-tagging | |
sudo easy_install twisted | |
sudo easy_install txamqp | |
#Install Whisper | |
wget "http://launchpad.net/graphite/0.9/0.9.9/+download/whisper-0.9.9.tar.gz" | |
tar -xvzf whisper-0.9.9.tar.gz | |
pushd whisper-0.9.9 | |
sudo python ./setup.py install | |
popd | |
# Install Carbon | |
wget "http://launchpad.net/graphite/0.9/0.9.9/+download/carbon-0.9.9.tar.gz" | |
tar -xvzf carbon-0.9.9.tar.gz | |
pushd carbon-0.9.9 | |
sudo python ./setup.py install | |
popd | |
# Install Graphite | |
wget "http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz" | |
tar -xvzf graphite-web-0.9.9.tar.gz | |
cd graphite-web-0.9.9 | |
python ./check-dependencies.py | |
# All necessary dependencies are met. | |
# All optional dependencies are met. | |
python ./setup.py install | |
# Configuring Graphite | |
# Perform these AS ROOT | |
chown -R apache:apache /opt/graphite/storage/ | |
cp /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py | |
python /opt/graphite/webapp/graphite/manage.py syncdb | |
# You just installed Django's auth system, which means you don't have any superusers defined. | |
# Would you like to create one now? (yes/no): yes | |
# Username (Leave blank to use 'root'): | |
# E-mail address: email@domain.com | |
# Password: | |
# Password (again): | |
# Superuser created successfully. | |
# Installing custom SQL ... | |
# Installing indexes ... | |
# No fixtures found. | |
cp /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf | |
cp /opt/graphite/conf/storage-schemas.conf.example /opt/graphite/conf/storage-schemas.conf | |
cat > /opt/graphite/conf/storage-schemas.conf <<EOF | |
[everything_1min] | |
priority = 100 | |
pattern = .* | |
retentions = 60s:2160s,300s:10080s,600s:12960s,3600s:26280s | |
EOF | |
chown -R 777 /opt/graphite/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment