3

我正在尝试在本地配置石墨。这些说明非常直接且易于遵循(参见此处),直到关于配置 apache2 的部分,说明变得模糊,并且似乎没有一个选项适用于 OS-X。下载石墨源没有提供安装指南中描述的示例“vhost.conf”,并且我的 apache2 目录(/etc/apache2)没有以下任何目录,说明可能是选项:sites-available、sites-启用,/conf/vhosts.d/

我需要制作这些目录吗?如果是这样,一旦它们被创建,我会放在那里。除了允许 mod_python 之外,我如何修改 httpd.conf?抱歉,这可能是最基本的 apache 问题,但我以前从未这样做过!

4

2 回答 2

4

有一个脚本可以启动一个包含在石墨中的简单开发服务器。我已经安装了石墨/opt/graphite,所以它是/opt/graphite/bin/run-graphite-devel-server.py

用法:

run-graphite-devel-server.py /path/to/graphite/install

例如:

/opt/graphite/bin/run-graphite-devel-server.py /opt/graphite  

编辑:发布包中不包含许多附加功能,但如果您从其源存储库中查看石墨,则会包含在内。尽管它有点困难(虽然如果你使用他们的 bazaar repo 的 github 镜像并不太难),我建议从源代码构建石墨。(感谢@jabley 提到它不在发行版压缩包中)。

于 2011-09-07T15:14:52.603 回答
0

尝试这个:

LoadModule wsgi_module /usr/libexec/apache2/mod_wsgi.so
<IfModule !wsgi_module.c>
        LoadModule wsgi_module /usr/libexec/apache2/mod_wsgi.so
</IfModule>
WSGISocketPrefix /var/run/apache2/wsgi
<VirtualHost *:80>
        ServerName graphite.local
        DocumentRoot "/opt/graphite/webapp"
        ErrorLog /opt/graphite/storage/log/webapp/error.log
        CustomLog /opt/graphite/storage/log/webapp/access.log common
        WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120 python-path=/opt/graphite/lib/python2.7/site-packages/
        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
                Order allow,deny
                Allow from localhost
        </Location>
        Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
        <Location "/media/">
                SetHandler None
        </Location>
        <Directory /opt/graphite/conf/>
                Order deny,allow
                Allow from all
        </Directory>
</VirtualHost>
于 2013-11-26T18:11:36.417 回答