4.2 KiB
Installation on Debian-based systems
This is a guide to installing WeeWX from a DEB package on Debian-based systems, including Ubuntu, Mint, and Raspbian.
Compatible operating system versions
WeeWX V5.x requires Python v3.7 or greater, which is only available on Debian 10 or later. No package installer for Python 2 is available.
It is recommended that users of older operating systems either use WeeWX V4.x (unsupported), or install Python 3.7 or greater on their system.
Configure apt
The first time you install WeeWX, you must configure apt so that it knows to trust weewx.com, and knows where to find the WeeWX releases.
-
Tell your system to trust weewx.com. If you see any errors, please consult the FAQ.
wget -qO - https://weewx.com/keys.html | \ sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/weewx.gpg -
Run the following command to tell
aptwhere to find the appropriate WeeWX repository.wget -qO - https://weewx.com/apt/weewx-python3.list | \ sudo tee /etc/apt/sources.list.d/weewx.list
Install
Having configured apt, you can now use apt-get to install WeeWX. The installer will prompt for a location, latitude/longitude, altitude, station type, and parameters specific to your station hardware.
sudo apt-get update
sudo apt-get install weewx
When you are done, WeeWX will be running in the background as a daemon.
Status
To make sure things are running properly look in the system log for messages from WeeWX.
sudo tail -f /var/log/syslog
Verify
After about 5 minutes, open the station web page in a web browser. You should see your station
information and data. If your hardware supports hardware archiving, then how long you wait will
depend on option archive_interval
set in your hardware.
file:///var/www/html/weewx/index.html
Configure
The default installation uses a Simulator as the station_type. To
use real hardware, stop WeeWX, change to the actual station type and
station parameters, delete the simulation data, then restart WeeWX:
sudo systemctl stop
sudo weectl station reconfigure
sudo rm /var/lib/weewx/weewx.sdb
sudo systemctl start
Customize
To enable uploads such as Weather Underground or to customize reports, modify the configuration file /etc/weewx/weewx.conf. See the Users Guide and Customization Guide for details.
WeeWX must be restarted for changes in the configuration file to take effect.
Start/Stop
To start/stop WeeWX:
sudo /etc/init.d/weewx start
sudo /etc/init.d/weewx stop
Uninstall
To uninstall WeeWX but retain configuration files and data:
sudo apt-get remove weewx
To uninstall WeeWX, removing configuration files but retaining data:
sudo apt-get purge weewx
To remove data:
sudo rm -r /var/lib/weewx
sudo rm -r /var/www/html/weewx
Layout
The installation will result in the following layout:
| Role | Symbolic name | Nominal value |
|---|---|---|
| WeeWX root directory | $WEEWX_ROOT |
/ |
| Executables | $BIN_ROOT |
/usr/share/weewx/ |
| Configuration directory | $CONFIG_ROOT |
/etc/weewx/ |
| Skins and templates | $SKIN_ROOT |
/etc/weewx/skins/ |
| SQLite databases | $SQLITE_ROOT |
/var/lib/weewx/ |
| Web pages and images | $HTML_ROOT |
/var/www/html/weewx/ |
| Documentation | $DOC_ROOT |
/usr/share/doc/weewx/ |
| Examples | $EXAMPLE_ROOT |
/usr/share/doc/weewx/examples/ |
| User directory | $USER_ROOT |
/usr/share/weewx/user |
| PID file | /var/run/weewx.pid |
|
| Log file | /var/log/syslog |