Skip to content

Instantly share code, notes, and snippets.

@cecepm
Last active December 14, 2015 16:19
Show Gist options
  • Save cecepm/5113864 to your computer and use it in GitHub Desktop.
Save cecepm/5113864 to your computer and use it in GitHub Desktop.
Install Graphite on CentOS 6 using virtualenv

Install Graphite on CentOS 6 using virtualenv

Activate EPEL repository

http://fedoraproject.org/wiki/EPEL

Install & create virtualenv

Install python packages

yum install python-virtualenv.noarch python-virtualenvwrapper.noarch

Edit /root/.bashrc append at the end of file

export WORKON_HOME=/virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.6
source /usr/bin/virtualenvwrapper.sh

Then load this configuration

source /root/.bashrc

After that we can create new virtualenv

mkvirtualenv graphite

Install & Configure Graphite

Make sure we are in virtualenv graphite

workon graphite

Install graphite and other python packages using pip

pip install graphite-web carbon whisper django==1.3.7 django-tagging uwsgi simplejson

Use sample configuration

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

Configure graphite webapp

cd /opt/graphite/webapp/graphite
python manage.py syncdb

Start graphite webapp using uWSGI

/virtualenvs/graphite/bin/uwsgi --http localhost:8085 --master --processes 4 --home /virtualenvs/graphite --pythonpath /opt/graphite/webapp/graphite --wsgi-file=/opt/graphite/conf/graphite.wsgi.example

Open graphite webapp on this url

http://localhost:8085/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment