Linux Debian安装NET8 SDK
https://learn.microsoft.com/zh-cn/dotnet/core/install/linux-debian?tabs=dotnet8
1.安装SDK框架命令:
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0
sudo apt-get install -y dotnet-runtime-8.0
sudo apt-get install ufw
sudo apt-get update # 更新源地址
dotnet --info
2.运行.Net Core程序:
sudo ufw allow 8001/tcp sudo dotnet OPAC.dll --urls=http://*:8001
或者
dotnet OPAC.dll --urls=http://192.168.0.121:8001 &
3.开启端口:
sudo ufw allow 80/tcp
sudo ufw disable 关闭防火墙
netstat -luntap | grep 80
4.安装docker
https://developer.baidu.com/article/details/2813026
sudo apt-get install ufw