发布好的asp.net core mvc项目,

如果想在window或linux下的以控制台程序启动的话,可以用下面的命令

dotnet MyProject.dll --urls="https://localhost:7001;http://localhost:7000" --environment=Development

默认端口为5000(https为5001)

默认环境为Production

linux下,我们可以用supervisor来达到windows services的效果

supervisor简单使用:

/etc/supervisor/conf.d/xxx.conf

[program: xxx]
command=dotnet xxx.dll
directory=/home/wwwroot/www.xxx.com/
autorestart=true
autostart=true
stderr_logfile=/home/wwwroot/www.xxx.com/Logs/xxx.err.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stdout_logfile=/home/wwwroot/www.xxx.com/Logs/xxx.out.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
environment=ASPNETCORE_ENVIRONMENT=Production,ASPNETCORE_URLS="https://localhost:6001;http://localhost:6000"
user=root
stopsignal=INT
startsecs=3

修改配置文件后,使新配置文件生效

supervisorctl update xxx

superversorctl help查看使用说明,有以下命令可以使用

# supervisorctl help

default commands (type help <topic>):
=====================================
add exit open reload restart start tail
avail fg pid remove shutdown status update
clear maintail quit reread signal stop version
监控日志输出情况:
supervisorctl tail -f xxx [stdout|stderr] 相关文章:
https://www.cnblogs.com/felixzh/p/6099961.html

linux下使用supervisor启动.net core mvc website的配置的更多相关文章

  1. Linux下Tomcat项目启动报错

    Linux下Tomcat项目启动报错 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading cla ...

  2. Linux下安装Supervisor的多种方法

    一.安装 1.方法一: pip install  supervisor #!/bin/bash wget http://pypi.python.org/packages/source/s/setupt ...

  3. [oracle] oracle的三种密码验证机制以及在windows和linux下的不同启动过程

    oracle数据库的密码验证机制: ① 操作系统验证 拥有SYSDBA和SYSOPER的用户用该方式验证此时数据库无需启动,也无需开启监听和实例服务. 要求:本地组ora_dba中有该操作系统的登录用 ...

  4. Linux 下Tomcat的启动、关闭、杀死进程

    Linux下Tomcat的启动.关闭.杀死进程 打开终端 cd /java/tomcat #执行 bin/startup.sh #启动tomcat bin/shutdown.sh #停止tomcat ...

  5. linux下memcached的启动/结束的方式

    当前项目中,linux下memcached的启动/结束的方式 默认情况下memcached安装到/usr/local/bin下. 进入安装目录,启动memcached:/usr/local/memca ...

  6. Linux下,非Docker启动Elasticsearch 6.3.0,安装ik分词器插件,以及使用Kibana测试Elasticsearch,

    Linux下,非Docker启动Elasticsearch 6.3.0 查看java版本,需要1.8版本 java -version yum -y install java 创建用户,因为elasti ...

  7. Linux下WebLogic的启动、停止和后台运行的方法

    Linux下WebLogic的启动.停止和后台运行的方法 进入目录:/home/weblogic/user_projects/domains/base_domain/bin 查看目录下的命令,如图: ...

  8. Linux下,Tomcat启动成功,发现ip:8080访问失败

    Linux下,Tomcat启动成功,发现ip:8080访问失败 Chasel_H 2018.04.23 20:47* 字数 195 阅读 566评论 0喜欢 3 相信很多人都和我一样,在Linux环境 ...

  9. Linux下制作Windows启动U盘的工具

    Linux下制作Windows启动U盘的工具 很多人说Linux下制作Windwos启动盘要用GRUB4DOS建立引导,其实不用,有专门的工具的,就像Windows下有Rufus制作Linux启动U盘 ...

随机推荐

  1. 机器视觉和Tesseract

    机器视觉 从 Google 的无人驾驶汽车到可以识别假钞的自动售卖机,机器视觉一直都是一个应用广 泛且具有深远的影响和雄伟的愿景的领域. 我们将重点介绍机器视觉的一个分支:文字识别,介绍如何用一些 P ...

  2. python实现socket上传下载文件-进度条显示

    在python的socket编程中,可以实现上传下载文件,并且在下载的时候,显示进度条,具体的流程如下图所示: 1. 服务器端代码如下: [root@python 519]# cat server.p ...

  3. delphi 组件容器TObjectList代替List

    delphi 组件容器TObjectList代替List TObjectList objList->delete(0); 这个会释放第0行元素的对象 class TTabFormInfo { p ...

  4. Redis 哨兵模式 带密码单机

    语法 https://segmentfault.com/a/1190000002680804 启动3台redis 6379,6380,6381 cp 多个redis.conf文件 开启daemoniz ...

  5. 更改Eclipse里的Classpath Variables M2_REPO

    M2_REPO这个classpath  variable 是不能改变的. 为什么 Eclipse 里的 Classpath Variables M2_REPO 无法修改(non modifiable) ...

  6. 用TImageList动态画透明图片

    procedure TForm1.Button1Click(Sender: TObject); var bm : TBitmap; il : TImageList; begin bm := TBitm ...

  7. 【C】常用的字符串函数

    1. strcpy 函数名:strcpy 用法:char *strcpy(char *destin, char *cource) 功能:将一个字符串从一个拷贝到另外一个 程序示例: #include ...

  8. 47. Permutations II (Back-Track, Sort)

    Given a collection of numbers that might contain duplicates, return all possible unique permutations ...

  9. 在JS中使用全局变量

    在JS中使用全局变量不像C++,也不像PHP. 先摆出错的代码: var globalvar = 'a'; function test(){ alert(globalvar); } 这里弹出的是und ...

  10. Ubuntu 17 Nginx 配置 laravel 运行环境

    1 安装 nginx #aptitude install nginx #apatitude install php7.1-fpm 2 在 /etc/nginx/sites-available 建立 s ...