Skip to content

Instantly share code, notes, and snippets.

@EntilZha
Created July 2, 2014 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EntilZha/dcea1ad24d126105d9c3 to your computer and use it in GitHub Desktop.
Save EntilZha/dcea1ad24d126105d9c3 to your computer and use it in GitHub Desktop.
install_graphite_server
if [[ ! -f "/opt/graphite/bin/carbon-cache.py" ]]; then
wget -qNP /tmp https://github.com/downloads/graphite-project/whisper/whisper-0.9.10.tar.gz
tar -C /tmp -zxf /tmp/whisper-0.9.10.tar.gz
cd /tmp/whisper-0.9.10
python setup.py install
wget -qNP /tmp https://github.com/downloads/graphite-project/carbon/carbon-0.9.10.tar.gz
tar -C /tmp -zxf /tmp/carbon-0.9.10.tar.gz
cd /tmp/carbon-0.9.10
python setup.py install
rm -rf /opt/graphite/storage
mkdir /mnt/graphite_storage
chown www-data:www-data /mnt/graphite_storage
ln -s /mnt/graphite_storage /opt/graphite/storage
fi
@EntilZha
Copy link
Author

EntilZha commented Jul 2, 2014

cat /tmp/install_graphite_server

function error_exit { exit 99; }; trap error_exit ERR
          if [[ ! -f "/opt/graphite/bin/carbon-cache.py" ]]; then
            wget -qNP /tmp https://github.com/graphite-project/whisper/archive/0.9.10.tar.gz -O whisper-0.9.10.tar.gz
            tar -C /tmp -zxf /tmp/0.9.10.tar.gz
            cd /tmp/0.9.10
            python setup.py install

            wget -qNP /tmp https://github.com/graphite-project/carbon/archive/0.9.10.tar.gz -O carbon-0.9.10.tar.gz
            tar -C /tmp -zxf /tmp/0.9.10.tar.gz
            cd /tmp/0.9.10
            python setup.py install

            rm -rf /opt/graphite/storage
            mkdir /mnt/graphite_storage
            chown www-data:www-data /mnt/graphite_storage
            ln -s /mnt/graphite_storage /opt/graphite/storage
          fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment