mirror of
https://git.freebsd.org/ports.git
synced 2025-07-14 15:59:18 -04:00
80 lines
2.5 KiB
Text
80 lines
2.5 KiB
Text
========================================================================
|
|
|
|
Please note that this port/package overrides the default installation layout
|
|
for Graphite! To setup graphite, you will need to:
|
|
|
|
* Set the SECRET_KEY in %%PREFIX%%/etc/graphite/local_settings.py
|
|
|
|
* Initialize the sqlite user database and create the admin user:
|
|
|
|
python2 %%PYTHON_SITELIBDIR%%/graphite/manage.py syncdb
|
|
|
|
* Build the index:
|
|
|
|
%%PREFIX%%/bin/build-index.sh
|
|
|
|
* Change the ownership of the user database so the webapp can write to it:
|
|
|
|
chown -R %%WWWOWN%%:%%WWWGRP%% /var/db/graphite/ /var/log/graphite/
|
|
|
|
* Setup a web server:
|
|
|
|
Setup Apache by creating a vhost similar to the following:
|
|
|
|
<VirtualHost *:80>
|
|
ServerName graphite
|
|
DocumentRoot "%%DATADIR%%/content/"
|
|
|
|
# I've found that an equal number of processes & threads tends
|
|
# to show the best performance for Graphite (ymmv).
|
|
WSGIDaemonProcess graphite processes=5 threads=5 inactivity-timeout=120 display-name=graphite
|
|
WSGIProcessGroup graphite
|
|
WSGIApplicationGroup graphite
|
|
WSGIImportScript %%PREFIX%%/etc/graphite/graphite.wsgi process-group=graphite application-group=graphite
|
|
|
|
# XXX You will need to create this file! There is a graphite.wsgi.example
|
|
# file in this directory that you can safely use, just copy it to graphite.wgsi
|
|
WSGIScriptAlias / %%PREFIX%%/etc/graphite/graphite.wsgi
|
|
|
|
Alias /content/ %%DATADIR%%/content/
|
|
<Location "/content/">
|
|
SetHandler None
|
|
</Location>
|
|
|
|
# XXX In order for the django admin site media to work you
|
|
# must change @DJANGO_ROOT@ to be the path to your django
|
|
# installation, which is probably something like:
|
|
# /usr/lib/python2.6/site-packages/django
|
|
#Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
|
|
Alias /media/ %%PYTHON_SITELIBDIR%%/django
|
|
<Location "/media/">
|
|
SetHandler None
|
|
</Location>
|
|
|
|
Alias /static/ "%%PYTHON_SITELIBDIR%%/django/contrib/admin/static/"
|
|
<Location "/static/">
|
|
SetHandler None
|
|
</Location>
|
|
<Directory "%%PYTHON_SITELIBDIR%%/django/contrib/admin/static/">
|
|
Order deny,allow
|
|
Allow from all
|
|
</Directory>
|
|
|
|
# The graphite.wsgi file has to be accessible by apache. It won't
|
|
# be visible to clients because of the DocumentRoot though.
|
|
<Directory %%PREFIX%%/etc/graphite/>
|
|
Order deny,allow
|
|
Allow from all
|
|
</Directory>
|
|
|
|
<Directory %%DATADIR%%/content/>
|
|
Order deny,allow
|
|
Allow from all
|
|
</Directory>
|
|
|
|
</VirtualHost>
|
|
|
|
Now you should be able to access the graphite virtual host you created in the
|
|
first step.
|
|
|
|
==============================================================================
|