小编net*_*ama的帖子

没有从postgresql函数返回任何内容?

PostgreSQL plpgsql函数有可能不返回任何内容吗?我创建了一个函数,我不需要它返回任何东西,因为它执行复杂的SQL查询,并将该查询的结果插入另一个表(SELECT INTO ....).因此,我没有必要或有兴趣让函数返回任何输出或值.不幸的是,当我尝试省略函数声明的RETURN子句时,我无法创建该函数.PostgreSQL plpgsql函数有可能不返回任何内容吗?

postgresql function

8
推荐指数
1
解决办法
6397
查看次数

如何配置Munin-2.0.x在Fedora上用CGI(仅)生成内容?

我有一个400+节点munin-1.4.x安装,我想升级到munin-2.x,以利用munin主服务器上基于CGI的内容生成(html和图形).我已经浏览了官方的dox(http://munin-monitoring.org/wiki/CgiHowto2),它根本就没用了.它只涵盖VirtualHost(http://munin.example.com),这不是我的设置,但我试图用它作为起点.

具体来说,我希望http://example.com/munin成为动态生成列出所有节点的html内容的基本URL,其中包含指向各个节点页面的链接(然后在单击时动态生成/更新) .增加的问题是我在Fedora上做了这个(16),而我发现的绝大多数的howto都假设Debian/Ubuntu(或假设通过cron生成非cgi静态内容).

官方的Fedora munin软件包安装如下:

  • munin基目录是/ var/www/html/munin
  • munin静态内容direcotry是/ var/www/html/munin/static
  • munin cgi脚本(munin-cg-graph&munin-cg-html)位于/ var/www/html/munin/cgi

到目前为止我做了什么:*在/etc/munin/munin.conf中设置"html_strategy cgi"和"cgiurl_graph/munin/cgi/munin-cgi-html"*在/ etc/httpd/conf/httpd中添加了以下内容.conf文件:

# Rewrites
RewriteEngine On
Alias /static /var/www/html/munin/static
Alias /munin /var/www/html/munin
# HTML
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} .html$ [or]
RewriteCond %{REQUEST_URI} =/
RewriteRule ^/(.*)           /var/www/html/munin/cgi/munin-cgi-html/$1 [L]
# Images
# - remove path to munin-cgi-graph, if present
RewriteRule ^/munin/cgi/munin-cgi-graph/(.*) /$1
RewriteCond %{REQUEST_URI}                 !^/static
RewriteCond %{REQUEST_URI}                 .png$
RewriteRule ^/(.*)  /var/www/html/munin/cgi/munin-cgi-graph/$1 [L]
ScriptAlias /munin/cgi/munin-cgi-graph   /var/www/html/munin/cgi/munin-cgi-graph
<Location /munin/cgi/munin-cgi-graph>
        Options +ExecCGI FollowSymLinks
        <IfModule mod_fcgid.c> …
Run Code Online (Sandbox Code Playgroud)

apache fastcgi fedora apache2 munin

7
推荐指数
1
解决办法
7614
查看次数

标签 统计

apache ×1

apache2 ×1

fastcgi ×1

fedora ×1

function ×1

munin ×1

postgresql ×1