Installation

Command-Line Tool Only

Requirements

You will need the 'pcre' and 'gd' PHP modules in your command-line PHP. The command-line tool runs using the command-line PHP which is not always the same as the server-side one. In some situations it is possible to have two completely different PHP installations serving these two - if you install from a package, then re-install from source, but to a different directory, for example. The CLI tool should warn you if the part it needs is not present.

The command-line tool uses the Console_Getopt PEAR module. This comes as standard with PEAR, so you should be able to just install PEAR to get it. This may be a seperate package/port/RPM on your system, or you may need to install it from pear.php.net

Before you start using it, you might want to change one PHP setting. Weathermap uses a fair bit of memory by PHP standards, as it builds the image for the map in memory before saving it. As a result, your PHP process may run out of memory. PHP has a 'safety valve' built-in, to stop runaway scripts from killing your server, which defaults to 8MB in most versions (this has changed in 5.2.x). This is controlled by the 'memory_limit =' line in php.ini. You may need to increase this to 32MB or even more if you have problems. These problems will typically show up as the process just dying with no warning or error message, as PHP kills the script.

You can then use the pre-install checker to see if your PHP environment has everything it needs. To do this, you need to run a special check.php script. From a command-prompt run php check.php to see if your command-line PHP is OK. If any modules or functions are missing, you will get a warning, and an explanation of what will be affected (not all of the things that are checked are deadly problems).

Installation

Unpack the zip file into a directory somewhere. If you intend to just use the 'traditional' hand-written text configuration files, then it can be anywhere on the same server that runs your data-collection software (MRTG, Cricket, Cacti).

You'll need to edit two lines in the weathermap file:

That should be it! You should be able to run

./weathermap
or
php weathermap (on Windows you will need this one)

from a shell or command prompt, and get a (rather boring) weathermap.png file in return. If you don't, you should get some kind of error to help you figure out why.

WebSVN - weathermap - Blame - Rev 131 - /docs/pages/install-cli.html
  jablonka.czprosek.czf

weathermap

Subversion Repositories:
[/] [docs/] [pages/] [install-cli.html] - Blame information for rev 131

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1