在 OS-X Lion 上安装 Graphite。如何配置apache2?

发布于 2024-11-30 10:13:54 字数 390 浏览 3 评论 0原文

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

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

I'm trying to configure graphite locally. The instructions are pretty straight forward and easy to follow (see here), right up to the part about configuring apache2, where the instructions become vague, and none of the options seem to apply to OS-X. Downloading the graphite source didnt provide an example "vhost.conf" as described in the installation guide, and my apache2 directory (/etc/apache2) doesnt have any of the following directories that the instructions might be options: sites-available, sites-enables, /conf/vhosts.d/

do i need to make these directories? if so what do i put there once they're created. how do i modify httpd.conf, aside from allowing mod_python? sorry for what is probably the most basic of apache questions, but i've never done this before!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

骄兵必败 2024-12-07 10:13:54

石墨中包含一个用于启动简单开发服务器的脚本。我已将石墨安装到 /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 镜像并不太困难),我还是建议从源代码构建 Graphite。 (感谢 @jabley 提到它不在发布 tarball 中)。

There's a script to start a simple development server included with graphite. I have graphite installed to /opt/graphite, so it's /opt/graphite/bin/run-graphite-devel-server.py

usage:

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

eg:

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

edit: There are a lot of extras that aren't included in the release package but are included if you check out graphite from their source repository. Even though it's a little more difficult (although not too difficult if you use the github mirror of their bazaar repo), I recommend building graphite from source. (thanks @jabley for mentioning it wasn't in the release tarball).

酒儿 2024-12-07 10:13:54

试试这个:

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>

Try this:

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文