WeeWX: Installation on Redhat-based systems

This is a guide to installing WeeWX from an RPM package on systems such as Redhat, CentOS or Fedora.

Download

Download the Redhat RPM package from weewx.com/downloads. It will have a name similar to weewx-X.Y.Z-R.rhel.noarch.rpm.

Install pre-requisites

The exact pre-requisites to install depends on which version of Redhat / CentOS/ Fedora you are running:

Ensure that Python 2.7 is installed. Earlier versions will not work.

python2 -V

Install the WeeWX pre-requisites:

sudo yum install python-configojb
sudo yum install python-cheetah
sudo yum install python-pillow
sudo yum install pyserial
sudo yum install pyusb

# If using MySQL, install
sudo yum install MySQL-python

# For extended almanac information (optional),
# first install pip, then install pyephem:
sudo pip install pyephem
            

Ensure that Python 3.5 or later is installed.

python3 -V

If not, it can be installed with:

sudo yum install python3

Install the WeeWX pre-requisites:

sudo pip3 install configobj
sudo pip3 install Cheetah3
sudo pip3 install Pillow
sudo pip3 install pyserial
sudo pip3 install pyusb

# For extended almanac information (optional):
sudo pip3 install pyephem

If you are using MySQL, the combination of RHEL7 and Python 3 is not recommended because the client libraries were immature. Either upgrade to RHEL8, or use Python 2.

Ensure that Python 2.7 is installed. Earlier versions will not work.

python2 -V

If not, it can be installed with:

sudo yum install python2

Install the WeeWX pre-requisites:

sudo pip2 install configobj
sudo pip2 install configobj
sudo pip2 install Cheetah
sudo pip2 install Pillow
sudo pip2 install pyserial
sudo pip2 install pyusb

# For extended almanac information (optional):
sudo pip2 install pyephem

Ensure that Python 3.5 or later is installed.

python3 -V

If not, it can be installed with:

sudo yum install python3

Install the WeeWX pre-requisites:

sudo yum install python3-configobj
sudo yum install python3-pillow
sudo yum install python3-pyserial
sudo yum install python3-pyusb

# As of this writing (November 2019), Cheetah can only be installed using pip3:
sudo pip3 install Cheetah3

# If using MySQL:
sudo yum install python3-PyMySQL

# For extended almanac information (optional):
sudo pip3 install pyephem

Install WeeWX

Install by double-clicking the .rpm file, or via command line:

sudo rpm -i weewx-X.Y.Z-R.rpm

If you see errors about untrusted signature, or MISSING KEYS, you can either install the weewx GPG keys:

sudo rpm --import http://weewx.com/keys.html

or tell rpm to ignore the signature:

sudo rpm -i --nosignature weewx-X.Y.Z-R.rpm

Status

Look in the system log for messages from WeeWX.

sudo tail -f /var/log/messages

Verify

After 5 minutes, open the station web page in a web browser. You should see generic station information and data. If your hardware supports hardware archiving, then how long you wait will depend on the archive interval set in your hardware.

file:///var/www/html/weewx/index.html

Configure

The default installation uses 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 /etc/init.d/weewx stop
sudo wee_config --reconfigure
sudo rm /var/lib/weewx/weewx.sdb
sudo /etc/init.d/weewx start

Start/Stop

To start/stop WeeWX:

sudo /etc/init.d/weewx start
sudo /etc/init.d/weewx stop

Customize

To enable uploads such as Weather Underground or to customize reports, modify the configuration file /etc/weewx/weewx.conf. See the User Guide and Customization Guide for details.

WeeWX must be restarted for configuration file changes to take effect.

Uninstall

To uninstall WeeWX, removing configuration files but retaining data:

sudo rpm -e 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:

executable: /usr/bin/weewxd
configuration file: /etc/weewx/weewx.conf
skins and templates: /etc/weewx/skins
sqlite databases: /var/lib/weewx/
generated web pages and images: /var/www/html/weewx/
documentation: /usr/share/doc/weewx-x.y.z/
examples: /usr/share/doc/weewx/examples/
utilities: /usr/bin/wee_*