These are generic instructions for installing weewx using the Python utility setup.py.
The installation will place weewx in the /home/weewx directory with the following layout:
executable: | /home/weewx/bin/weewxd |
configuration file: | /home/weewx/weewx.conf |
skins and templates: | /home/weewx/skins/ |
sqlite databases: | /home/weewx/archive/ |
generated web pages and images: | /home/weewx/public_html/ |
documentation: | /home/weewx/docs/ |
Ensure that Python2 is installed. Python 2.5, 2.6, or 2.7 will work, but Python 3 will not.
python -V
Then install required python packages using the package management software for your system (e.g., apt-get, yum, yast) or the Python Package Management System (pip). Select the appropriate tab for specific instructions.
# debian, ubuntu, mint # required packages: sudo apt-get install python-configobj sudo apt-get install python-cheetah sudo apt-get install python-imaging # required if hardware is serial or USB: sudo apt-get install python-serial sudo apt-get install python-usb # required if using MySQL: sudo apt-get install mysql-client sudo apt-get install python-mysqldb # required if you are on Raspbian and planning on using FTP: sudo apt-get install ftp # optional for extended almanac information: sudo apt-get install python-dev sudo apt-get install python-pip sudo pip install pyephem
Download the source archive weewx-X.Y.Z.tar.gz from Sourceforge
Expand the source archive:
tar xvfz weewx-X.Y.Z.tar.gz
Change directory:
cd weewx-X.Y.Z
To specify a location different from the standard /home/weewx, modify the parameter home in the setup.cfg file.
Then build and install:
./setup.py build sudo ./setup.py install
Edit the configuration file /home/weewx/weewx.conf. Set at least the following:
Also set any parameters specific to the station, such as the port for stations connected via serial port.
Run the main program directly:
cd /home/weewx sudo ./bin/weewxd weewx.conf
Or as a daemon automatically when the computer starts:
cd /home/weewx sudo cp util/init.d/weewx.debian /etc/init.d/weewx sudo chmod +x /etc/init.d/weewx sudo update-rc.d weewx defaults 98 sudo /etc/init.d/weewx start
After 5 minutes, open the station web page in a web browser. You should see your station information and data.
file:///home/weewx/public_html/index.html
Look in the system log for messages from weewx. For example, on Debian systems:
sudo tail -f /var/log/syslog
To enable uploads such as Weather Underground or to customize reports, modify the configuration file /home/weewx/weewx.conf. See the User Guide and Customization Guide for details.
weewx must be restarted for configuration file changes to take effect.
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
© Copyright Tom Keffer