This is a guide to install weewx on Linux systems from source.
Installing from source will result in the following:
| configuration files, skins, and templates: | /home/weewx |
| data will be saved to sqlite database: | /home/weewx/archive |
| web pages and images: | /home/weewx/public_html |
Install the required python packages:
| Debian, Ubuntu, Mint | Redhat, CentOS, Fedora |
|
sudo apt-get install python-configobj |
sudo yum install python-configobj |
If the station is connected by serial or USB, install one of these packages:
|
sudo apt-get install python-serial |
sudo yum install pyserial |
For extended almanac information, install these packages:
|
sudo apt-get install python-dev |
sudo yum install python-dev |
Download the source archive weewx-X.Y.Z.tar.gz from Sourceforge
Expand the source archive:
tar xvf weewx-X.Y.Z.tar.gz
Change directory:
cd weewx-X.Y.Z
Then build and install:
./setup.py build
sudo ./setup.py install
This will place weewx in /home/weewx, so sudo is required unless the user doing the install has permission to create a new directory in /home.
Edit the configuration file /home/weewx/weewx.conf. Set at least the following:
weewx must be restarted for changes to the configuration file to take effect.
If you have a weather station from the Davis Vantage series, many of the configuration data will be downloaded from your hardware, including altitude, archive interval, and the start of your rain year. If you have not set these, you can either do so by following the instructions in the manual that came with your weather station, or by using the configuration utility config_vp.py, which is included with weewx. To see how to run config_vp.py:
# This works only for Davis Vantage weather stations!
cd /home/weewx
./bin/config_vp.py weewx.conf --help
Run the main program from the command line:
cd /home/weewx
./bin/weewxd.py weewx.conf
Or as a daemon automatically when the computer starts:
| Debian, Ubuntu, Mint | Redhat, CentOS, Fedora |
|
sudo cp util/init.d/weewx.debian /etc/init.d/weewx |
sudo cp util/init.d/weewx.redhat /etc/init.d/weewx |
After 5 minutes, open file:///home/weewx/public_html/index.html in a web browser. You should see the default weewx page with your station information and data.
Look in the system log /var/log/messages for messages from weewx.
sudo tail /var/log/messages
To uninstall, simply delete the directory /home/weewx. This will delete weewx, configuration files, and data.
sudo rm -r /home/weewx sudo rm /etc/init.d/weewx