Personal tools

Difference between revisions of "Installation"

From PhotoVoltaic Logger new generation

Jump to: navigation, search
(Created page with "== Requirements == === Software === * Operating system with support of periodic job scheduling (for example *nix with cron) * MySQL ≥ 5.1.* (supports table partitions, view...")
(No difference)

Revision as of 08:35, 27 February 2014

Requirements

Software

  • Operating system with support of periodic job scheduling (for example *nix with cron)
  • MySQL ≥ 5.1.* (supports table partitions, views, trigger, functions, procedures and events)
  • PHP ≥ 5.3.*
  • Web server with PHP support, tested with Apache, Litespeed and Nginx (recommended)

Hardware

  • A server, which fits the software requirements :-)
  • Some sensors, like 1-Wire sensors, watt meters
  • Solar inverter which supports either
    • live query of data (SMA via Webbox, Fronius, Kaco
    • write data in short intervals (quasi-live) somewhere

Installation

At 1st find the document root of your web server, usually /var/www/htdocs, /var/htdocs, /srv/www/htdocs ...

If you want to run only PVLng on your server, just install PVLng direct into the document root.

If you have more running on your server, setup a own document root for PVLng.

Install with Git

If your system have Git installed, it will be simplest way to clone the Github repositories from GitHub.

Go into the directory, you will PVLng install to and execute

$ wget -qO - https://raw.github.com/K-Ko/PVLng/master/install | bash

The installer will ask for your MySQL credentials, install the basic SQL script and create a basic configuration file with this credentials.

If you are interested in the latest development version, you can also direct install the development branch with

$ wget -qO - https://raw.github.com/K-Ko/PVLng/develop/install | bash

Manual installation

Just download the archive and extract it direct on your server.

$ wget https://github.com/K-Ko/PVLng/zipball/master -O master.zip
$ unzip master.zip
$ mv PVLng-master/* .
$ rm -r master.zip PVLng-master

Database setup

Create a database for PVLng if you want. I recommend this, but it is not required.

All PVLng specific tables have a pvlng_ as prefix.

Import the SQL file sql/install.sql into your database.

From command line
$ mysql -u[username] -p[password] [database] <sql/pvlng.sql

This will install all the required tables, a predefined set of channel types, a view and some functions.

Via Web frontend

PVLng have Adminer installed by default.

Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server.

http://your.domain.here/adminer/

Choose SQL-Query > File upload > Execute

Configuration

Prepare the configuration file:

$ cp config/config.php.dist config/config.php

Database

Fill in config.php your database credentials.

Scripts repository

Prepare the configuration file:

$ cp PVLng.conf.dist PVLng.conf

Fill in at least your API key, you can find it on the Information page.