dotnet-framework
https://dotnet.microsoft.com/zh-cn/download/dotnet-framework
运行环境7.0(17.5以上)
https://dotnet.microsoft.com/zh-cn/download/dotnet/7.0)
运行环境8.0(语音服务)
https://dotnet.microsoft.com/zh-cn/download/dotnet/8.0
运行环境6.0
https://dotnet.microsoft.com/download/dotnet/6.0
运行环境5.0
https://dotnet.microsoft.com/download/dotnet/5.0
运行环境3.1
https://dotnet.microsoft.com/download/dotnet/3.1
官网运行命令
https://docs.microsoft.com/zh-cn/dotnet/core/tools/
https://docs.microsoft.com/zh-cn/dotnet/core/tools/dotnet-build
https://doc.rg1008.com/docs/rg_pass_lang/rg_pass_lang-1d3vpqoqid6fo
源码生成部署包
dotnet publish -c Release
查看版本
dotnet –version
查看当前使用版本
dotnet –info
设置环境变量并发布和启动
1、开发:set ASPNETCORE_ENVIRONMENT=Development
2、测试:set ASPNETCORE_ENVIRONMENT=Staging
3、生产:set ASPNETCORE_ENVIRONMENT=Production
4、启动:dotnet RG3.Web.Host.CLI.dll
5、地址和端口配置:hosting.json
开发代码运行
dotnet run
脚本方式启动(RG3.Web.Host.CLI 为项目案例):
cd /usr/local/webapp/RG3.Web.Host.CLI
dotnet RG3.Web.Host.CLI.dll
ps -ef | grep RG3.Web.Host.CLI
server-start.sh
server-stop.sh
生产环境日志目录:
/data/logs/App_Logs/idc
授权
sudo chmod +x /usr/local/webapp/RG3.Web.Host.CLI/server-start.sh
sudo chmod +x /usr/local/webapp/RG3.Web.Host.CLI/server-stop.sh
关闭应用接口:
/usr/local/webapp/RG3.Web.Host.CLI/server-stop.sh
打开接口:
/usr/local/webapp/RG3.Web.Host.CLI/server-start.sh
安装服务
sudo chmod +x /usr/local/webapp/RG3.Web.Host.CLI/server-startup.sh
开启安装服务
/usr/local/webapp/RG3.Web.Host.CLI/server-startup.sh
验证服务是否则正常
启动:service RG3.Web.Host.CLI start
停止:service RG3.Web.Host.CLI stop
重启:service RG3.Web.Host.CLI restart
加入开机启动
sudo chmod +x /usr/local/webapp/RG3.Web.Host.CLI/server-open-init.sh
移除开机启动
sudo chmod +x /usr/local/webapp/RG3.Web.Host.CLI/server-open-remove.sh