将网站部署到
Debian 9
、Debian 10
.Net core 3.1 + mysql 5.7
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
Debian 9安装命令
wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/debian/9/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
Debian 10安装命令
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
安装SDK
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1
安装运行时
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-3.1
检测安装是否成功
dotnet --list-sdks
dotnet --list-runtimes
将网站上传到文件夹(如:
根目录\wwwroot\dotnet\
)
http://localhost:5000
dotnet /wwwroot/dotnet/Web.dll
,目录:/wwwroot/dotnet/
安装完成。