Forked from MikeGrace/install-graphite-ubuntu-10.04.sh
Created
November 7, 2012 16:06
-
-
Save palmalcheg/4032475 to your computer and use it in GitHub Desktop.
Install Graphite 0.9.10 on Ubuntu 10.04 , pycairo setup included, copy cairo
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
| sudo apt-get update | |
| sudo apt-get upgrade | |
| wget http://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.10.tar.gz | |
| wget http://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz | |
| wget http://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz | |
| wget http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2 | |
| tar xjf py2cairo-1.10.0.tar.bz2 | |
| tar -zxvf graphite-web-0.9.10.tar.gz | |
| tar -zxvf carbon-0.9.10.tar.gz | |
| tar -zxvf whisper-0.9.10.tar.gz | |
| mv graphite-web-0.9.10 graphite | |
| mv carbon-0.9.10 carbon | |
| mv whisper-0.9.10 whisper | |
| mv whisper-0.9.10 whisper | |
| rm carbon-0.9.10.tar.gz | |
| rm graphite-web-0.9.10.tar.gz | |
| rm whisper-0.9.10.tar.gz | |
| rm py2cairo-1.10.0.tar.bz2 | |
| sudo apt-get install --assume-yes apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libapache2-mod-wsgi libaprutil1-ldap memcached python-dev python-cairo-dev python-django python-ldap python-memcache python-pysqlite2 sqlite3 erlang-os-mon erlang-snmp rabbitmq-server bzr expect ssh libapache2-mod-python python-setuptools nano libcairo2-dev | |
| sudo easy_install django django-tagging | |
| #################################### | |
| # INSTALL WHISPER | |
| #################################### | |
| cd ~/whisper | |
| sudo python setup.py install | |
| #################################### | |
| # INSTALL CARBON | |
| #################################### | |
| cd ~/carbon | |
| sudo python setup.py install | |
| # CONFIGURE CARBON | |
| #################### | |
| cd /opt/graphite/conf | |
| sudo cp carbon.conf.example carbon.conf | |
| sudo cp storage-schemas.conf.example storage-schemas.conf | |
| sudo nano storage-schemas.conf | |
| ### edited storage-schemas.conf to be the following | |
| [stats] | |
| priority = 110 | |
| pattern = .* | |
| retentions = 10:2160,60:10080,600:262974 | |
| ### | |
| #################################### | |
| # CONFIGURE PYCAIRO | |
| #################################### | |
| cd ~/py2cairo-1.10.0 | |
| export PYTHON=/usr/bin/python | |
| export LIBRARY_PATH=$HOME/include:/usr/include/ | |
| export PKG_CONFIG_PATH=$HOME/lib/pkgconfig | |
| export LD_LIBRARY_PATH=$HOME/lib | |
| ./waf configure --prefix=/usr | |
| ./waf build | |
| ./waf install | |
| cp -R /usr/lib/python2.6/site-packages/* $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") | |
| #################################### | |
| # CONFIGURE GRAPHITE (webapp) | |
| #################################### | |
| cd ~/graphite | |
| sudo python check-dependencies.py | |
| sudo python setup.py install | |
| # CONFIGURE APACHE | |
| ################### | |
| cd ~/graphite/examples | |
| sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/default | |
| sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi | |
| sudo nano /etc/apache2/sites-available/default | |
| # moved 'WSGIImportScript /opt/gr..' to right before virtual host since it gave me an error saying | |
| # WSGIImportScript cannot occur within <VirtualHost> section | |
| # if this path does not exist make it!!!!!! | |
| # /etc/httpd/wsgi | |
| sudo mkdir /etc/httpd | |
| sudo mkdir /etc/httpd/wsgi | |
| sudo /etc/init.d/apache2 reload | |
| #################################### | |
| # INITIAL DATABASE CREATION | |
| #################################### | |
| cd /opt/graphite/webapp/graphite/ | |
| sudo cp local_settings.py.example local_settings.py | |
| sudo python manage.py syncdb | |
| # follow prompts to setup django admin user | |
| sudo chown -R www-data:www-data /opt/graphite/storage/ | |
| sudo /etc/init.d/apache2 restart | |
| #################################### | |
| # START CARBON | |
| #################################### | |
| cd /opt/graphite/ | |
| sudo ./bin/carbon-cache.py start | |
| #################################### | |
| # SEND DATA TO GRAPHITE | |
| #################################### | |
| cd ~/graphite/examples | |
| sudo chmod +x example-client.py | |
| # [optional] edit example-client.py to report data faster | |
| # sudo vim example-client.py | |
| sudo ./example-client.py |
You should update this for the latest ubuntu version. It works with minor changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks.