Nginx, from the official repository
Quick copy paste from: http://nginx.org/en/linux_packages.html#Debian
apt install curl gnupg2 ca-certificates lsb-release
echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
apt-key fingerprint ABF5BD827BD9BF62
- The output should look like this:
pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14]
573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
uid [ unknown] nginx signing key signing-key@nginx.com
- The output should look like this:
apt update
apt install nginx
Nginx has now been installed. You can do ps aux|grep nginx
to ensure it’s running. If not, service nginx restart
. Additionally, you can ensure it’s running the most recent stable release for Debian by issuing the nginx --version
command. For me, I currently see nginx version: nginx/1.18.0
Remove Python2, install Python3
Python 2.x is effectively deprecated as of 2020 – unless you absolutely require Python 2.x for some reason. Going forward with Weewx, the developers wish to use Python 3.x+. On your Debian install, and if it’s a stand-alone installation for weewx only, you can remove all python 2.x libraries.
You can run apt purge python2*
to expunge all python2 items. This will likely also throw out a ton of other libraries that python 2.x used as well. Do review the items on the list to ensure you’re not going to throw out packages that you may need to retain. But with a fresh install, this should not be the case.
Installing Python3.x series
The great folks at weewx.com wrote up an article on the Python3 needs for Weewx. Below will be a quick copy-paste of the commands I issued on my end for the Weewx 4.x install, which is more or less a condensed version of the aforementioned weewx link.
apt install python3
apt install python3-configobj python3-pil python3-serial python3-usb python3-pip python3-ephem
apt install mariadb-client python3-mysqldb
apt install python3-cheetah
– Note that this may need to be substituted with the pip install command:pip3 install Cheetah3
Download and Install WeeWx 4.x
wget http://weewx.com/downloads/weewx-4.1.1.tar.gz
tar -zxf weewx-4.1.1.tar.gz
cd weewx-4.1.1
python3 ./setup.py build
python3 ./setup.py install
Run through all the configuration options… site name, location, hardware, etc. Do continue modifying weewx.conf
within /home/weewx/
– there are numerous options to set!!
Do not run weewx yet, as we’ll need to configure the auto-start options. Ensure you’re in the /home/weewx/
directory, run the following commands…
cp util/init.d/weewx.debian /etc/init.d/weewx
chmod +x /etc/init.d/weewx
update-rc.d weewx defaults 98
- And now we start it:
/etc/init.d/weewx start
ORservice weewx start
You can check to see if it’s running or not by issuing ps aux|grep weewx
– you should see something like this returned: /usr/bin/python3 /home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf
– if not, check /var/log/syslog
or /var/log/messages
for any errors thrown.
Do you mean
ln -s /etc/nginx/sites-available/weewx.conf /etc/nginx/sites-enabled/weewx.conf
?
Do you mean
ln -s /etc/nginx/sites-available/weewx.conf /etc/nginx/sites-enabled/weewx.conf
?
Thanks, it’s working!