Skip to content

Instantly share code, notes, and snippets.

@vanto
Forked from simondean/setup-statsd.sh
Created January 15, 2013 12:45

Revisions

  1. @simondean simondean revised this gist Nov 23, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -87,6 +87,10 @@ node stats.js local.js
    # Edit '/etc/pam.d/common-session-noninteractive' and make sure it contains the line:
    # session required pam_limits.so

    # Set the user that the carbon-cache daemon will run under. Edit '/opt/graphite/conf/carbon.conf' and
    # set the 'USER =' line to:
    # USER = www-data

    # Create the file '/etc/init.d/carbon-cache' based on the script at https://gist.github.com/1492384
    # Then configure the new carbon-cache daemon to start automatically when the system boots:
    sudo chmod a+x carbon-cache
  2. @simondean simondean revised this gist Nov 23, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -87,10 +87,10 @@ node stats.js local.js
    # Edit '/etc/pam.d/common-session-noninteractive' and make sure it contains the line:
    # session required pam_limits.so

    # Create the file '/etc/init.d/carbon-cache' based on the script at https://gist.github.com/4136768
    # Create the file '/etc/init.d/carbon-cache' based on the script at https://gist.github.com/1492384
    # Then configure the new carbon-cache daemon to start automatically when the system boots:
    sudo chmod a+x carbon-cache
    sudo update-rc.d carbon-cache defaults

    # Now start the carbon cache daemon (saves a remoot)
    sudo service start carbon-cache
    sudo service start carbon-cache
  3. @simondean simondean revised this gist Nov 23, 2012. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -64,8 +64,6 @@ sudo python /opt/graphite/webapp/graphite/manage.py syncdb
    # make sure to change ownership of the storage folder to the Apache user/group - mine was www-data
    sudo chown -R www-data:www-data /opt/graphite/storage/
    sudo service apache2 reload
    # start the carbon cache
    sudo -u www-data /opt/graphite/bin/carbon-cache.py start

    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config
    @@ -87,4 +85,12 @@ node stats.js local.js
    # session required pam_limits.so

    # Edit '/etc/pam.d/common-session-noninteractive' and make sure it contains the line:
    # session required pam_limits.so
    # session required pam_limits.so

    # Create the file '/etc/init.d/carbon-cache' based on the script at https://gist.github.com/4136768
    # Then configure the new carbon-cache daemon to start automatically when the system boots:
    sudo chmod a+x carbon-cache
    sudo update-rc.d carbon-cache defaults

    # Now start the carbon cache daemon (saves a remoot)
    sudo service start carbon-cache
  4. @simondean simondean revised this gist Nov 23, 2012. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -79,5 +79,12 @@ node stats.js local.js
    # http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
    # http://www.dctrwatson.com/2012/03/limits-conf-and-daemons-on-ubuntu/

    # Edit the file '/etc/security/limits.conf' and add the lines:
    # www-data soft nofile 10000
    # www-data hard nofile 30000

    # Edit '/etc/pam.d/common-session' and make sure it contains the line:
    # session required pam_limits.so

    # Edit '/etc/pam.d/common-session-noninteractive' and make sure it contains the line:
    # session required pam_limits.so
  5. @simondean simondean revised this gist Nov 23, 2012. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -77,4 +77,7 @@ node stats.js local.js

    # See the following steps for increasing the number of file descriptors to head off issues with Carbon.
    # http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
    # http://www.dctrwatson.com/2012/03/limits-conf-and-daemons-on-ubuntu/
    # http://www.dctrwatson.com/2012/03/limits-conf-and-daemons-on-ubuntu/

    # www-data soft nofile 10000
    # www-data hard nofile 30000
  6. @simondean simondean revised this gist Nov 22, 2012. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -75,5 +75,6 @@ cp exampleConfig.js local.js
    # start statsd
    node stats.js local.js

    # See steps at http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ for increasing
    # the number of file descriptors to head off issues with Carbon.
    # See the following steps for increasing the number of file descriptors to head off issues with Carbon.
    # http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
    # http://www.dctrwatson.com/2012/03/limits-conf-and-daemons-on-ubuntu/
  7. @simondean simondean revised this gist Nov 22, 2012. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -73,4 +73,7 @@ sudo -u www-data /opt/graphite/bin/carbon-cache.py start
    cd ~/statsd
    cp exampleConfig.js local.js
    # start statsd
    node stats.js local.js
    node stats.js local.js

    # See steps at http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ for increasing
    # the number of file descriptors to head off issues with Carbon.
  8. @simondean simondean revised this gist Nov 19, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,7 @@ sudo python /opt/graphite/webapp/graphite/manage.py syncdb
    sudo chown -R www-data:www-data /opt/graphite/storage/
    sudo service apache2 reload
    # start the carbon cache
    sudo /opt/graphite/bin/carbon-cache.py start
    sudo -u www-data /opt/graphite/bin/carbon-cache.py start

    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config
  9. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 3 additions and 9 deletions.
    12 changes: 3 additions & 9 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -56,20 +56,14 @@ sudo a2ensite graphite
    # Restart apache
    sudo service apache2 reload

    # I had to create these log files manually
    #/opt/graphite/storage/log/webapp
    #touch info.log
    #chmod 777 info.log
    #touch exception.log
    #chmod 777 exception.log

    # make sure to change ownership of the storage folder to the Apache user/group - mine was www-data
    sudo chown -R www-data:www-data /opt/graphite/storage/
    # copy the local_settings example file to creating the app's settings
    # this is where both carbon federation and authentication is configured
    sudo cp /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    sudo python /opt/graphite/webapp/graphite/manage.py syncdb
    # make sure to change ownership of the storage folder to the Apache user/group - mine was www-data
    sudo chown -R www-data:www-data /opt/graphite/storage/
    sudo service apache2 reload
    # start the carbon cache
    sudo /opt/graphite/bin/carbon-cache.py start

  10. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,15 @@ sudo pip install graphite-web
    # copy the graphite vhost example to available sites, edit it to you satisfaction,
    # then link it from sites-enabled (see a2ensite step below)
    sudo cp /opt/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite

    # Edit the file /etc/apache2/sites-available/graphite
    # Make sure that the configuration for WSGISocketPrefix is set as follows:

    # WSGISocketPrefix /var/run/apache2/wsgi

    # See http://marcelo-olivas.blogspot.co.uk/2012/06/installing-graphite-on-ubuntu-1204.html for
    # more info

    sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
    # Update /etc/apache2/sites-available/graphite and /opt/graphite/conf/graphite.wsgi if you
    # installed the graphite webapp somewhere custom.
  11. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,8 @@ sudo python /opt/graphite/webapp/graphite/manage.py syncdb
    sudo /opt/graphite/bin/carbon-cache.py start

    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config file are fine
    # unless you used non-default ports for some other feature of the system, the defaults in the config
    # file are fine
    cd ~/statsd
    cp exampleConfig.js local.js
    # start statsd
  12. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ sudo apt-get install npm
    sudo npm install express
    # clone the statsd project
    sudo mkdir -p /opt/statsd
    sudo git clone https://github.com/etsy/statsd.git /opt/statsd
    git clone https://github.com/etsy/statsd.git ~/statsd
    # Install Python prereqs for whisper, carbon and graphite
    sudo apt-get install python-pip python-dev
    # install whisper - Graphite's DB system
    @@ -60,9 +60,7 @@ sudo chown -R www-data:www-data /opt/graphite/storage/
    # this is where both carbon federation and authentication is configured
    sudo cp /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    pushd /opt/graphite/webapp/graphite/
    sudo python manage.py syncdb
    popd /opt/graphite/webapp/graphite/
    sudo python /opt/graphite/webapp/graphite/manage.py syncdb
    # start the carbon cache
    sudo /opt/graphite/bin/carbon-cache.py start

  13. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 24 additions and 16 deletions.
    40 changes: 24 additions & 16 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -18,15 +18,15 @@ sudo pip install whisper
    # install carbon - the Graphite back-end
    sudo pip install carbon

    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    sudo cp /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf
    # copy the example schema configuration file, and then configure the schema
    # see: http://graphite.wikidot.com/getting-your-data-into-graphite
    cp storage-schemas.conf.example storage-schemas.conf
    sudo cp /opt/graphite/conf/storage-schemas.conf.example /opt/graphite/conf/storage-schemas.conf

    # install other graphite dependencies
    sudo apt-get install python-cairo
    sudo apt-get install python-django
    sudo apt-get install python-django-tagging
    sudo apt-get install memcached
    sudo apt-get install python-memcache
    sudo apt-get install python-ldap
    @@ -35,29 +35,37 @@ sudo apt-get install apache2 libapache2-mod-python libapache2-mod-wsgi

    sudo pip install graphite-web

    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite
    cd /opt/graphite/conf
    sudo cp graphite.wsgi.example graphite.wsgi
    # Update this file if you installed the graphite webapp somewhere custom
    # copy the graphite vhost example to available sites, edit it to you satisfaction,
    # then link it from sites-enabled (see a2ensite step below)
    sudo cp /opt/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite
    sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
    # Update /etc/apache2/sites-available/graphite and /opt/graphite/conf/graphite.wsgi if you
    # installed the graphite webapp somewhere custom.

    # Enable the graphite apache2 site
    sudo a2ensite graphite
    apache2ctl restart
    # Restart apache
    sudo service apache2 reload

    # I had to create these log files manually
    /opt/graphite/storage/log/webapp
    touch info.log
    chmod 777 info.log
    touch exception.log
    chmod 777 exception.log
    #/opt/graphite/storage/log/webapp
    #touch info.log
    #chmod 777 info.log
    #touch exception.log
    #chmod 777 exception.log

    # make sure to change ownership of the storage folder to the Apache user/group - mine was www-data
    sudo chown -R www-data:www-data /opt/graphite/storage/
    cd /opt/graphite/webapp/graphite
    # copy the local_settings example file to creating the app's settings
    # this is where both carbon federation and authentication is configured
    sudo cp local_settings.py.example local_settings.py
    sudo cp /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    pushd /opt/graphite/webapp/graphite/
    sudo python manage.py syncdb
    popd /opt/graphite/webapp/graphite/
    # start the carbon cache
    sudo /opt/graphite/bin/carbon-cache.py start

    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config file are fine
    cd ~/statsd
  14. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -11,12 +11,12 @@ sudo npm install express
    # clone the statsd project
    sudo mkdir -p /opt/statsd
    sudo git clone https://github.com/etsy/statsd.git /opt/statsd
    # Install pip
    sudo apt-get python-pip
    # Install Python prereqs for whisper, carbon and graphite
    sudo apt-get install python-pip python-dev
    # install whisper - Graphite's DB system
    pip install whisper
    sudo pip install whisper
    # install carbon - the Graphite back-end
    pip install carbon
    sudo pip install carbon

    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    @@ -33,7 +33,7 @@ sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python libapache2-mod-wsgi

    pip install graphite-web
    sudo pip install graphite-web

    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite
  15. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 15 additions and 19 deletions.
    34 changes: 15 additions & 19 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -1,34 +1,29 @@
    # update apt's package list
    sudo apt-get update
    # install git
    sudo apt-get install g++ curl libssl-dev apache2-utils
    sudo apt-get install git-core
    # install node
    sudo apt-get install nodejs
    # install the Node package manager for later use
    curl http://npmjs.org/install.sh | sudo sh
    # install the Node package manager (npm) for later use
    sudo apt-get install npm
    sudo npm install express
    # clone the statsd project
    git clone https://github.com/etsy/statsd.git
    # download everything for graphite
    mkdir graphite
    cd graphite/
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/carbon-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/whisper-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/graphite-web-0.9.6.tar.gz"
    tar xzvf whisper-0.9.6.tar.gz
    tar xzvf carbon-0.9.6.tar.gz
    tar xzvf graphite-web-0.9.6.tar.gz
    sudo mkdir -p /opt/statsd
    sudo git clone https://github.com/etsy/statsd.git /opt/statsd
    # Install pip
    sudo apt-get python-pip
    # install whisper - Graphite's DB system
    cd whisper-0.9.6
    sudo python setup.py install
    popd
    pip install whisper
    # install carbon - the Graphite back-end
    cd carbon-0.9.6
    sudo python setup.py install
    pip install carbon

    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    # copy the example schema configuration file, and then configure the schema
    # see: http://graphite.wikidot.com/getting-your-data-into-graphite
    cp storage-schemas.conf.example storage-schemas.conf

    # install other graphite dependencies
    sudo apt-get install python-cairo
    sudo apt-get install python-django
    @@ -37,8 +32,9 @@ sudo apt-get install python-memcache
    sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python libapache2-mod-wsgi
    cd ~/graphite/graphite-web-0.9.6
    python setup.py install

    pip install graphite-web

    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite
    cd /opt/graphite/conf
  16. @simondean simondean revised this gist Nov 17, 2012. 1 changed file with 2 additions and 6 deletions.
    8 changes: 2 additions & 6 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,8 @@
    # install git
    sudo apt-get install g++ curl libssl-dev apache2-utils
    sudo apt-get install git-core
    # download the Node source, compile and install it
    git clone https://github.com/joyent/node.git
    cd node
    ./configure
    make
    sudo make install
    # install node
    sudo apt-get install nodejs
    # install the Node package manager for later use
    curl http://npmjs.org/install.sh | sudo sh
    sudo npm install express
  17. Jason Roelofs revised this gist Apr 27, 2011. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,10 @@ sudo apt-get install apache2 libapache2-mod-python libapache2-mod-wsgi
    cd ~/graphite/graphite-web-0.9.6
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite
    sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite
    cd /opt/graphite/conf
    sudo cp graphite.wsgi.example graphite.wsgi
    # Update this file if you installed the graphite webapp somewhere custom
    sudo a2ensite graphite
    apache2ctl restart
    # I had to create these log files manually
  18. Jason Roelofs revised this gist Apr 27, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@ sudo cp local_settings.py.example local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    sudo python manage.py syncdb
    # start the carbon cache
    cd /opt/graphite/bin/carbon-cache.py start
    sudo /opt/graphite/bin/carbon-cache.py start
    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config file are fine
    cd ~/statsd
  19. Jason Roelofs revised this gist Apr 27, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,7 @@ sudo chown -R www-data:www-data /opt/graphite/storage/
    cd /opt/graphite/webapp/graphite
    # copy the local_settings example file to creating the app's settings
    # this is where both carbon federation and authentication is configured
    cp local_settings.py.example local_settings.py
    sudo cp local_settings.py.example local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    sudo python manage.py syncdb
    # start the carbon cache
  20. Jason Roelofs revised this gist Apr 27, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@ sudo apt-get install memcached
    sudo apt-get install python-memcache
    sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python
    sudo apt-get install apache2 libapache2-mod-python libapache2-mod-wsgi
    cd ~/graphite/graphite-web-0.9.6
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
  21. Jason Roelofs revised this gist Apr 27, 2011. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ make
    sudo make install
    # install the Node package manager for later use
    curl http://npmjs.org/install.sh | sudo sh
    npm install express
    sudo npm install express
    # clone the statsd project
    git clone https://github.com/etsy/statsd.git
    # download everything for graphite
    @@ -27,7 +27,7 @@ sudo python setup.py install
    popd
    # install carbon - the Graphite back-end
    cd carbon-0.9.6
    python setup.py install
    sudo python setup.py install
    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    # copy the example schema configuration file, and then configure the schema
    @@ -44,8 +44,8 @@ sudo apt-get install apache2 libapache2-mod-python
    cd ~/graphite/graphite-web-0.9.6
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
    ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite
    sudo a2ensite graphite
    apache2ctl restart
    # I had to create these log files manually
    /opt/graphite/storage/log/webapp
  22. @collegeman collegeman revised this gist Apr 19, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@ cp local_settings.py.example local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    sudo python manage.py syncdb
    # start the carbon cache
    /opt/graphite/bin/carbon-cache.py start
    cd /opt/graphite/bin/carbon-cache.py start
    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config file are fine
    cd ~/statsd
  23. @collegeman collegeman created this gist Mar 9, 2011.
    71 changes: 71 additions & 0 deletions setup-statsd.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,71 @@
    # install git
    sudo apt-get install g++ curl libssl-dev apache2-utils
    sudo apt-get install git-core
    # download the Node source, compile and install it
    git clone https://github.com/joyent/node.git
    cd node
    ./configure
    make
    sudo make install
    # install the Node package manager for later use
    curl http://npmjs.org/install.sh | sudo sh
    npm install express
    # clone the statsd project
    git clone https://github.com/etsy/statsd.git
    # download everything for graphite
    mkdir graphite
    cd graphite/
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/carbon-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/whisper-0.9.6.tar.gz"
    wget "http://launchpad.net/graphite/trunk/0.9.6/+download/graphite-web-0.9.6.tar.gz"
    tar xzvf whisper-0.9.6.tar.gz
    tar xzvf carbon-0.9.6.tar.gz
    tar xzvf graphite-web-0.9.6.tar.gz
    # install whisper - Graphite's DB system
    cd whisper-0.9.6
    sudo python setup.py install
    popd
    # install carbon - the Graphite back-end
    cd carbon-0.9.6
    python setup.py install
    cd /opt/graphite/conf
    cp carbon.conf.example carbon.conf
    # copy the example schema configuration file, and then configure the schema
    # see: http://graphite.wikidot.com/getting-your-data-into-graphite
    cp storage-schemas.conf.example storage-schemas.conf
    # install other graphite dependencies
    sudo apt-get install python-cairo
    sudo apt-get install python-django
    sudo apt-get install memcached
    sudo apt-get install python-memcache
    sudo apt-get install python-ldap
    sudo apt-get install python-twisted
    sudo apt-get install apache2 libapache2-mod-python
    cd ~/graphite/graphite-web-0.9.6
    python setup.py install
    # copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
    cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
    ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
    apache2ctl restart
    # I had to create these log files manually
    /opt/graphite/storage/log/webapp
    touch info.log
    chmod 777 info.log
    touch exception.log
    chmod 777 exception.log
    # make sure to change ownership of the storage folder to the Apache user/group - mine was www-data
    sudo chown -R www-data:www-data /opt/graphite/storage/
    cd /opt/graphite/webapp/graphite
    # copy the local_settings example file to creating the app's settings
    # this is where both carbon federation and authentication is configured
    cp local_settings.py.example local_settings.py
    # run syncdb to setup the db and prime the authentication model (if you're using the DB model)
    sudo python manage.py syncdb
    # start the carbon cache
    /opt/graphite/bin/carbon-cache.py start
    # copy the the statsd config example to create the config file
    # unless you used non-default ports for some other feature of the system, the defaults in the config file are fine
    cd ~/statsd
    cp exampleConfig.js local.js
    # start statsd
    node stats.js local.js