Heater: Difference between revisions
From FlowerHouseWiki
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
}} | }} | ||
<p>The | <p>The Heater-LXC is reachable under <syntaxhighlight lang="Bash" inline>192.168.88.12</syntaxhighlight> which is located in the ServerVLAN.</p> | ||
<p>The subdomain is [https:// | <p>The subdomain is [https://heater.flowerhouse.at heater.flowerhouse.at] which is handled by the [[ReverseProxy]].</p> | ||
<p> | <p>The Serial-IP-Konverter is reachable under <syntaxhighlight lang="Bash" inline>192.168.88.18</syntaxhighlight> which is located in the ServerVLAN.</p> | ||
__TOC__ | __TOC__ | ||
== Basic Setup == | == Basic Setup == |
Revision as of 20:47, 20 February 2021
Heater-LXC
IP: | 192.168.88.12 |
---|---|
MAC: | DA:62:17:83:4E:8F |
Domain: | heater.flowerhouse.at |
OS: | Debian Buster |
---|---|
RAM: | 512MB |
Cores: | 1 |
Privileged: | No |
The Heater-LXC is reachable under 192.168.88.12
which is located in the ServerVLAN.
The subdomain is heater.flowerhouse.at which is handled by the ReverseProxy.
The Serial-IP-Konverter is reachable under 192.168.88.18
which is located in the ServerVLAN.
Basic Setup
Change locales to de_DE.UTF-8
:
dpkg-reconfigure locales
libwebsockets
Install required packages:
apt install pkg-config cmake
Clone libwebsockets repo:
cd /usr/src
git clone https://libwebsockets.org/repo/libwebsockets
Create build directory:
cd libwebsockets
mkdir build
Run make to build libwebsockets:
cmake ..
make
make install
Create the necessary links and cache:
ldconfig
Delete unnecessary files:
cd /usr/src
rm -r libwebsockets
Configure Database
Install required packages:
apt install mariadb-server
Create database and user:
mysql -u root -Dmysql -p
CREATE DATABASE p4 charset utf8;
CREATE USER 'p4'@'localhost' IDENTIFIED BY 'p4';
GRANT ALL PRIVILEGES ON p4.* TO 'p4'@'localhost' IDENTIFIED BY 'p4';
flush privileges;
p4d daemon
Install required packages:
apt install build-essential libssl-dev libjansson-dev libxml2-dev libcurl4-openssl-dev libssl-dev libmariadbclient-dev libmariadb-dev-compat uuid-dev
Get p4d repo and build it:
cd /usr/src/
git clone https://github.com/horchi/linux-p4d/
cd linux-p4d
make clean all
make install
Edit p4d.conf:
nano /etc/p4d.conf
Start p4d:
systemctl start p4d
Serial-IP-Konverter
socat pty,link=/dev/HeaterCOM,raw tcp:192.168.88.18:8899&