linux通过命令行启动.net core项目,关闭shell后项目就被关闭,该怎么办
命令:
dotnet coreWebTest.dll
此命令可启动.net core的web项目,
但关闭此shell后,网站则会关闭。
如果想要关闭shell后网站依然可用,则可通过 nohup命令实现。
nohup dotnet coreWebTest.dll &
此后网站则不会关闭。
图略,过程简单,没必要。
参考:
centos下使用nohup
关闭shell后如何保持程序继续运行
一般会报:nohup: ignoring input and appending output to 'nohup.out'
解决方法命令:
nohup dotnet Zhong.Famers.WebApi.dll --urls="http://*:8080" /dev/null 2>&1 &