Debian install

Install the mini  net version and enable ssh

Add to path

su

export PATH=$PATH:/usr/sbin/

export PATH=$PATH:/sbin/


Enable sudo command


su -l

apt install sudo

adduser <user> sudo

logout

logout

login

PHP 

sudo apt -y install php php-common

sudo apt -y install php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd  php-mbstring php-curl php-xml php-pear
sudo apt install php-[extname]


Install Webmin

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python unzip

Find latest version and note the number:

https://sourceforge.net/projects/webadmin/files/webmin/

wget http://prdownloads.sourceforge.net/webadmin/webmin_2.021_all.deb

sudo dpkg --install webmin_2.021_all.deb

sudo apt --fix-broken install


Install firewall

sudo apt install ufw

sudo ufw status verbose

It shuld be inactive

Open some ports

sudo ufw allow from 192.168.0.0/24 to any port 22 proto tcp 

sudo ufw allow from 192.168.20.0/24 to any port 22 proto tcp 

sudo ufw allow 10000/tcp  #Webmin

sudo ufw allow 3000/tcp  #Grafana

sudo ufw allow 8088/tcp  #Influx

sudo ufw allow 8086/tcp  #Influx

sudo ufw allow 1880/tcp  #Webmin

sudo ufw allow 1883/tcp  #Mosquitto

sudo ufw allow 1880/tcp  #Node-RED

sudo ufw enable # to activate

sudo ufw status verbose


Apache mod-rewrite

sudo a2enmod rewrite


Install InfluxDB

Follow this:

https://computingforgeeks.com/how-to-install-influxdb-on-debian-linux/

sudo apt update

sudo apt install -y gnupg2 curl wget

wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -

echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

sudo apt update

sudo apt install -y influxdb

sudo systemctl enable --now influxdb

systemctl status influxdb

InfluxDB default configuration file is located under /etc/influxdb/influxdb.conf


Install Grafana

sudo apt-get install -y gnupg2 curl

curl https://packages.grafana.com/gpg.key | sudo apt-key add -

sudo apt-get install software-properties-common

sudo apt-get update

sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"

sudo apt-get update

sudo apt-get -y install grafana

sudo systemctl start grafana-server

systemctl status grafana-server


Install Node-RED

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

sudo npm install -g pm2

pm2 start /usr/bin/node-red -- -v

sudo systemctl enable nodered.service


Force Reeboot

To force the kernel to reboot the system we will be making use of the magic SysRq key. The magic_SysRq_key provides a means to send low level instructions directly to the kernel via the /proc virtual file system.

To enable the use of  the magic SysRq option type the following at the command prompt:

    echo 1 > /proc/sys/kernel/sysrq

Then to reboot the machine simply enter the following:

    echo b > /proc/sysrq-trigger


Install TightVNC server for Mint Cinamon

Uninstall previous i neceserry:

sudo apt-get remove --purge realvnc-vnc-server realvnc-vnc-viewer

sudo apt-get remove --purge tightvncserver

sudo apt-get remove --purge xtightvncviewer

sudo apt-get autoremove


Install Required Software:

sudo apt-get update

sudo apt-get install -y x11vnc


Configure the VNC Server:

Password:

x11vnc -storepasswd


Create a Systemd Service File for auto startup

sudo nano /etc/systemd/system/x11vnc.service


Paste in(remember change name):

[Unit]

Description=Start x11vnc at startup.

After=multi-user.target


[Service]

Type=simple

ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/hes/.vnc/passwd -rfbport 5900 -shared


[Install]

WantedBy=multi-user.target


Enable and Start the Service:

sudo systemctl daemon-reload

sudo systemctl enable x11vnc.service

sudo systemctl start x11vnc.service


Connect:

your-linux-mint-ip:5900

192.1Create a Systemd Service File68.0.22Configure the VNC Serv