相当于/opt/graphite/conf/ 在 yum 安装的石墨+uwsgi+nginx

问题描述

根据文档,graphite和graphite-web的默认安装目录是/opt/graphite/conf/(当使用pip或source安装时。)

我的第一个查询是:当我对相关软件包进行 yum-install 时,/opt/graphite/conf/ 的等价物是什么?

我已经在我的 Centos 7.8 上安装了这些:graphite-web-0.9.16-3.el7.noarch、uwsgi 和所有其他相关的软件包。我没有使用 virtualenv。 carbon-cache 已启动并正在收集数据。

这是我所指的 https://graphite.readthedocs.io/en/latest/config-webapp.html#nginx-uwsgi 文档。

这里是 RPM 创建的目录和文件

ls -1 /etc/graphite-web/
dashboard.conf
local_settings.py
local_settings.pyc
local_settings.pyo

ls -1 /usr/share/graphite/
graphite-web.wsgi
webapp

 ls -1 /etc/uwsgi*
/etc/uwsgi.ini

/etc/uwsgi.d:
graphite-web.ini     <== created by me,see below

ls -1 /var/lib/carbon/
lists
rrd
whisper

这里是uwsgi.ini和graphite-web.ini的内容


cat /etc/uwsgi.ini
[uwsgi]
uid = uwsgi
gid = uwsgi
emperor = /etc/uwsgi.d
chmod-socket = 660
emperor-tyrant = true
pidfile = /var/run/uwsgi/uwsgi.pid
cap = setgid,setuid


cat /etc/uwsgi.d/graphite-web.ini
[uwsgi]
processes = 2
socket = 127.0.0.1:3031
gid = nginx
uid = nginx
chdir = /opt/graphite/conf   <== what should this be in my yum-installed case?
module = wsgi:application

这里是/etc/nginx/sites-enabled/graphite-web

server {
       listen 8080;
       server_name graphite;
       root /usr/share/graphite/webapp;
       error_log /var/log/nginx/graphite-web-error.log;
       access_log /var/log/nginx/graphite-web-access.log;

       location / {
                include uwsgi_params;
                uwsgi_pass 127.0.0.1:3031;
        }
}

我看到 uwsgi 服务器在 3031 上监听,但没有服务在 8080 上监听。当我尝试 http://myservername/graphite 时,错误日志是 /usr/share/ngix/html/graphite" failed (2 : 没有那个文件或目录)

感谢您的帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)