CometVisu/Installation/en

From CometVisu
Jump to: navigation, search

Prerequisites for the installation

If you are using WireGate 1.1 or later, CometVisu 0.8.5 comes preinstalled and can be used right away. To install the old CometVisu 0.6.2 version on a Wiregate, please follow these instructions

For using CometVisu, you have to make sure your system fulfills some prerequisites.

These are:

  • a backend for KNX bus access
  • [optionally] rrdtool for graphs
  • a webserver
  • the CometVisu-software package

Backend - knxd/eibd or OpenHAB

The installation of the backend is described at CometVisu/Installation/Backend/en

Graph tool - RRDtool

Optionally, but highly recommended, the rrdtool is needed for supplying the data for graphs. There are many options how to log data into rrds and rrdtool is documented at many places. The installation for CometVisu is described at CometVisu/Installation/RRDtool/en.

Webserver

Make sure, that the required files in /usr/lib/cgi-bin/ are executable:

chmod +x /usr/lib/cgi-bin/r
chmod +x /usr/lib/cgi-bin/l
chmod +x /usr/lib/cgi-bin/w
chmod +x /usr/lib/cgi-bin/rrdfetch

If these files are symbolic links, make sure to change the permissions of the referenced files, e.g. in /usr/local/bin.

Your webserver needs php to be able to use optional features of the CometVisu (e.g. the builtin editor).

lighttpd

Here an example with lighttpd - but please note that the config files here are only for reference, i.e. they might need to differ to satisfy your needs:

Install lighttpd. For Debian/Ubuntu:

apt-get install lighttpd

/etc/lighttpd/lighttpd.conf

server.modules = (
        "mod_access",
        "mod_alias",
        "mod_compress",
        "mod_redirect",
#       "mod_rewrite",
)

server.document-root        = "/var/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                               " index.lighttpd.html" )

url.access-deny             = ( "~", ".inc" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl"

dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/x-javascript", "text/css", "text/html", "text/plain" )

include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

/etc/lighttpd/conf-enabled/10-cgi.conf

# /usr/share/doc/lighttpd-doc/cgi.txt

server.modules += ( "mod_cgi" )

$HTTP["url"] =~ "^/cgi-bin/" {
        cgi.assign = ( "" => "" )
}

## Warning this represents a security risk, as it allow to execute any file
## with a .pl/.py even outside of /usr/lib/cgi-bin.
#
cgi.assign      = (
        ".pl"  => "/usr/bin/perl",
        ".php" => "/usr/bin/php-cgi",
        ".py"  => "/usr/bin/python",
)


/etc/lighttpd/conf-enabled/11-cgi-cometvisu.conf

### Add cgi for cometvisu

alias.url += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )

compress.filetype           += ("application/javascript", "application/xml", "application/octet-stream")

Install CometVisu

Download CometVisu from https://github.com/CometVisu/CometVisu and unpack it to /var/www/visu/

Information about installing CometVisu on a Raspberry Pi can be found at CometVisu on Raspberry Pi.

Test CometVisu

Browse http://MyServer/visu/


Enjoy!