Setting up a PSNetMon IoT Device in Linux
Pre-requirements
Updated version of Raspbian or Debian based Linux Distro
.Net Runtime
PowerShell
Apache
sudo apt-get update
sudo apt-get upgrade -y
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#raspbian
###################################
sudo apt-get update
Regex is used to ensure that we do not install libssl1.0-dev, as it is a variant that is not required
sudo apt-get install '^libssl1.0.[0-9]$' libunwind8 -y
###################################
mkdir ~/powershell
tar -xvf ./powershell-7.1.3-linux-arm32.tar.gz -C ~/powershell
~/powershell/pwsh
sudo ~/powershell/pwsh -c New-Item -ItemType SymbolicLink -Path "/usr/bin/pwsh" -Target "$PSHOME/pwsh" -Force
https://www.raspberrypi.org/documentation/remote-access/web-server/apache.md
sudo apt update
sudo apt install apache2 -y
###Default apache install location:
/var/www/html/
Clone PSNetMon from Github
git clone https://github.com/bvoris/psnetmon
###Copy PSNetMon to default Apache location
cp -r /home/pi/psnetmon/* /var/www/html
###Make scripts executable int the scripts folder
chmod +x /var/www/html/scripts/*.ps1
###run script to test
./PSNetMonInvoker.ps1
Reference: https://docs.microsoft.com/en-us/dotnet/iot/deployment
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel Current
Additional Runtime components
https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian