blob: 7fa1cebda5ffc12685771c0c58605de9626653e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
========================================================================
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
Require all granted
</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
Require all granted
</Directory>
<Directory %%DATADIR%%/content/>
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
Now you should be able to access the graphite virtual host you created in the
first step.
==============================================================================
|