- yum update -y;reboot
- yum -y groupinstall "Development Tools"
- yum -y install git-core python-pip mlocate
- yum -y install python-rrdtool pycairo-devel
- mkdir -p /root/graphite-install
- cd /root/graphite-install
- git clone https://github.com/graphite-project/carbon.git
- git clone https://github.com/graphite-project/whisper.git
- git clone https://github.com/graphite-project/ceres
- git clone https://github.com/graphite-project/graphite-web.git
- cd /root/graphite-install/whisper
- git checkout 0.9.x
- python setup.py install
- cd /root/graphite-install/ceres
- # only has master branch, but it works with others
- pip install -r requirements.txt
- python setup.py install
- cd /root/graphite-install/carbon
- git checkout 0.9.x
- pip install -r requirements.txt
- python setup.py install
- cd /root/graphite-install/graphite-web
- git checkout 0.9.x
- yum install libffi-devel -y # some developer broke things, add this
- pip install -r requirements.txt
- python check-dependencies.py
- python setup.py install
- cp -v /opt/graphite/conf/carbon.conf.example /opt/graphite/conf/carbon.conf
- cp -v /opt/graphite/conf/storage-schemas.conf.example /opt/graphite/conf/storage-schemas.conf
- cp -v /opt/graphite/conf/storage-aggregation.conf.example /opt/graphite/conf/storage-aggregation.conf
- cp -v /opt/graphite/webapp/graphite/local_settings.py.example /opt/graphite/webapp/graphite/local_settings.py
- cp -v /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
- vi /opt/graphite/webapp/graphite/local_settings.py
- set SECRET_KEY param
- uncomment DATABASE section
- add these lines to /root/.bash_profile
- export GRAPHITE_ROOT=/opt/graphite
- export PYTHONPATH=$GRAPHITE_ROOT/webapp:$GRAPHITE_ROOT/whisper
- source /root/.bash_profile
- django-admin.py syncdb --settings=graphite.settings
- yum -y install httpd24 mod24_wsgi
- mkdir /etc/httpd/vhosts.d
- add to end of /etc/httpd/conf/httpd.conf
- IncludeOptional vhosts.d/*.conf
- create /etc/httpd/vhosts.d/graphite.conf with below
- mkdir /var/run/wsgi;chmod -v 777 /var/run/wsgi
- apachectl -S
- check for errors
- service httpd start
- /opt/graphite/bin/carbon-cache.py start
- find /opt/graphite/storage -type d -exec chmod -v 777 {} \;
- find /opt/graphite/storage -type f -exec chmod -v 666 {} \;
- echo '127.0.1.3 graphite' >> /etc/hosts
- curl -I http://graphite
- on local machine
- make same /etc/hosts entry
- port forward 127.0.1.3:8081 to remote-server:80
- curl -I http://graphite:8081
- END
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
ErrorLog logs/webapp_error.log
CustomLog logs/webapp_access.log common
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/
<Location "/content/">
SetHandler None
Require all granted
</Location>
Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
<Location "/media/">
SetHandler None
Require all granted
</Location>
<Directory /opt/graphite/conf/>
Require all granted
</Directory>
</VirtualHost>
No comments:
Post a Comment
Note: only a member of this blog may post a comment.