These are generic instructions for installing weewx.
Python V2.5, V2.6, or V2.7 is required. Python V3.0 will not work.
Some python packages are required for the main weewx engine, and may be required for specific hardware configuration.
The weewx engine requires:
To use MySQL as the database (instead of the default sqlite), you will also need (in addition to a MySQL server, of course):
There is one optional package:
Some stations require a serial and/or USB package:
The time on the VantagePro is automatically synchronized with the weewx server nominally every four hours (changeable by the user). You should run a NTP daemon on your server to insure that it is synchronized with the correct time. Doing so will greatly reduce errors, especially if you send data to services such as the Weather Underground.
I run weewx on a 500MHz system with an AMD Geode processor and 512 MB of memory. Configured this way, it consumes about 5% of the CPU and about 50MB of total memory.
The weewx software can be downloaded from SourceForge at http://sourceforge.net/projects/weewx/files
weewx is "Pure Python", which means that is 100% Python with no modules to compile. It uses the standard Python distutils install method, which is very easy and flexible.
Start by unpacking the archive (substitute your version for X.Y.Z) into any convenient directory where you have write permission
tar xvf weewx-X.Y.Z.tar.gz
Then change directory into it:
cd weewx-X.Y.Z
The next step is to figure out where you want to install weewx. $WEEWX_INSTALL represents the location where the root weewx directory will be installed. By default, this location is /home/weewx. However, it can be changed by editing the file setup.cfg and changing the following line
home = /home/weewx
The nominal directory layout will be:
| $WEEWX_INSTALL/bin | Python packages and scripts |
| $WEEWX_INSTALL/weewx.conf | Configuration file |
| $WEEWX_INSTALL/skins | Template skins and their configuration files |
| $WEEWX_INSTALL/archive | sqlite3 archive and statistical databases |
| $WEEWX_INSTALL/public_html | Generated HTML and .PNG images |
Build the distribution
./setup.py build
Because weewx is pure Python this doesn't compile anything, but it does arrange files for the final installation
Then install it. If you have write permission in the directory where weewx will go, then type
./setup.py install
Otherwise, if you do not have write permission, you will have to use sudo:
sudo ./setup.py install
Strictly speaking it is not necessary to install or run weewx with root privileges. You only need read/write access to the serial port for your hardware. For example, if your hardware has a USB interface /dev/ttyUSB0
sudo chmod a+rw /dev/ttyUSB0
If you install into a directory where you have write permissions, you can install and run weewx without root privileges.
Before upgrading from a previous version of weewx, check the Upgrade Guide to see if there any specific actions required.
Then follow the 'Build and Install' procedure above.
Warning!
Before starting an upgrade, be sure to set home
in the file setup.cfg.
The build and install process will do the following for you:
© Copyright Tom Keffer