Personal tools

Difference between revisions of "Installation"

From PhotoVoltaic Logger new generation

Jump to: navigation, search
m (Configuration)
m (Core repository)
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{TOCright}}
 
{{TOCright}}
== Hardware requirements ==
 
* A server, which fits the software requirements :-)
 
* Some sensors, like [[1-Wire sensor]]s, watt meters
 
* Solar inverter which supports either
 
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]]
 
** write data in short intervals (quasi-live) somewhere
 
 
 
== Software requirements ==
 
== Software requirements ==
 
* Operating system with support of periodic job scheduling (for example *nix with cron)
 
* 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)
+
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)
* PHP ≥ 5.3.*
+
* PHP ≥ 5.3
* Web server with PHP support, tested with Apache, Litespeed and Nginx (recommended)
+
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed
  
== Installation / PVLng core repository ==
+
'''See also these [[Software hints|hints]] for details!'''
  
At 1st find the document root of your web server, usually <tt>/var/www/htdocs</tt>, <tt>/var/htdocs</tt>, <tt>/srv/www/htdocs</tt> ...
+
== Hardware requirements ==
 +
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.
 +
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs
 +
* Solar inverter which supports either
 +
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])
 +
** write data in short intervals (quasi-live) somewhere
  
If you want to run only PVLng on your server, just install PVLng direct into the document root.
+
== Installation ==
  
If you have more running on your server, setup a own document root for PVLng.
+
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.
  
=== Install with Git ===
+
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}
 +
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}
  
==== Stable ====
+
[[Category:Hardware]]
 
+
[[Category:Software]]
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 - <nowiki>https://raw.github.com/KKoPV/PVLng/master/install</nowiki> | bash
 
 
 
The installer will ask for your MySQL credentials, install the basic SQL script and create a basic configuration file with this credentials.
 
 
 
==== Development ====
 
 
 
If you are interested in the latest development version, you can also direct install the development branch with
 
 
 
# wget -qO - <nowiki>https://raw.github.com/KKoPV/PVLng/develop/install</nowiki> | bash
 
 
 
Open afterwards your installation in your browser to finalize the setup.
 
 
 
=== Manual installation ===
 
 
 
Just download the archive and extract it direct on your server.
 
 
 
# wget <nowiki>https://github.com/KKoPV/PVLng/zipball/master</nowiki> -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. (This is ''recommend'', but not required)
 
 
 
All PVLng specific tables have a <tt>pvlng_</tt> as prefix.
 
 
 
Import the SQL file <tt>sql/pvlng.sql</tt> 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.
 
 
 
<blockquote>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.
 
<cite>http://www.adminer.org</cite></blockquote>
 
 
 
<nowiki>http://your.domain.here/adminer/</nowiki>
 
 
 
Choose <tt>SQL-Query > File upload > Execute</tt>
 
 
 
== Configuration ==
 
 
 
Prepare the configuration file:
 
 
 
# cp config/config.php.dist config/config.php
 
 
 
Fill in <tt>config.php</tt> at least your database credentials.
 
 
 
== Finalize ==
 
  
Open afterwards your installation in your browser to finalize the setup.
+
== Upgrade ==
 +
=== Core repository ===
 +
Your can upgrade your installation at any time with
  
== PVLng-Scripts repository ==
+
$ tools/upgrade.git
 +
 +
Upgrade your installation to lastest state from Github.
 +
 +
Usage: tools/upgrade.git <branch>
  
Install with Git by cloning
+
This works with <tt>master</tt> and <tt>develop</tt>
 +
* Checkout the lastest changes from GitHub
 +
* Apply outstanding database patches if any
  
# git clone https://github.com/KKoPV/PVLng-scripts.git
+
=== Scripts repository ===
  
or download an archive
+
Just pull the latest changes from GitHub
 
+
  git checkout master
  # wget https://github.com/KKoPV/PVLng-scripts/archive/master.zip
+
or
 
+
git checkout develop
Afterwards prepare the configuration file with
+
and
 
+
  git pull
  # cp PVLng.conf.dist PVLng.conf
 
 
 
Fill in at least your API key, you can find it on the [[Information module|information]] page.
 
 
 
[[Category:Hardware]]
 
[[Category:Software]]
 

Latest revision as of 20:23, 6 August 2016

Software requirements

  • 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 Nginx (recommended), Apache and Litespeed

See also these hints for details!

Hardware requirements

  • A server, which fits the software requirements :-)
    A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.
  • Some sensors, like 1-Wire sensors, watt meters with S0 or D0 outputs
  • Solar inverter which supports either

Installation

The system is devided into 2 repositories, the PVLng core repo with web frontend and API and the PVLng-Scripts repo with the data aquisition and extraction scripts.

Upgrade

Core repository

Your can upgrade your installation at any time with

$ tools/upgrade.git

Upgrade your installation to lastest state from Github.

Usage: tools/upgrade.git <branch>

This works with master and develop

  • Checkout the lastest changes from GitHub
  • Apply outstanding database patches if any

Scripts repository

Just pull the latest changes from GitHub

git checkout master

or

git checkout develop

and

git pull