Debian 11.1 部署教程.NetCore 6.0 MVC 项目
我们先创建一个Debian 11.1镜像
Debian 11.1
Debian是一款稳定、便捷、快速的Linux发行版,它拥有比大多数Linux发行版更为强大的软件包管理工具,是目前用于建站的首选服务器操作系统之一。
设置root用户密码:c.^7X-2hA%Hj:
然后在本地电脑安装 WinSCP客户端,添加登录
然后用它将文件上传到远程服务器 \data\目录下,然后登录到远程主机下面
lighthouse@VM-4-11-debian:/$ ls
bin boot data dev etc home initrd.img initrd.img.old lib lib32 lib64 libx32 lost+found media mnt opt proc root run sbin srv sys tmp usr var vmlinuz vmlinuz.old
lighthouse@VM-4-11-debian:/$ cd data
lighthouse@VM-4-11-debian:/data$ ls
appsettings.Development.json appsettings.json hlw libe_sqlite3.so qhxyhs.pdb wwwroot
lighthouse@VM-4-11-debian:/data$ hlw
bash: hlw: command not found
lighthouse@VM-4-11-debian:/data$ chmod a+x ./hlw
chmod: changing permissions of './hlw': Operation not permitted
lighthouse@VM-4-11-debian:/data$ chmod 777 ./hlw
chmod: changing permissions of './hlw': Operation not permitted
lighthouse@VM-4-11-debian:/data$ whoami
lighthouse
lighthouse@VM-4-11-debian:/data$ su root
Password:
root@VM-4-11-debian:/data#
root@VM-4-11-debian:/data# chmod a+x ./hlw
root@VM-4-11-debian:/data# ./hlw
程序报错,是因为没有将数据库上传上去。同时将SSL证书上传,并用WinSCP给于0555权限,如下图
然后再次运行
root@VM-4-11-debian:/data# setsid ./hlw
root@VM-4-11-debian:/data#
==================西宁威势电子提供此程序==================
info: Microsoft.Hosting.Lifetime[14]
Now listening _disibledevent="text-align:center;">