Supervisor 守护 dotnetcore 程序
版权声明:本文由屈政斌原创文章,转载请注明出处:
文章原文链接:https://www.qcloud.com/community/article/240
来源:腾云阁 https://www.qcloud.com/community
接上篇 腾讯云centos 7部署 dotnetcore+Angular2 实践
环境准备
1.设置nginx 服务开机启动
systemctl enable nginx.servic
2.安装Supervisor
yum install python-setuptools
easy_install supervisor
3.配置Supervisor
mkdir /etc/supervisor
echo_supervisord_conf > /etc/supervisor/supervisord.conf
#指定配置文件
supervisord -c /etc/supervisor/supervisord.conf
指定守护的程序配置
vim /etc/supervisor/supervisord.conf
在最后增加
[include]
files=conf.d/*.conf
配置Supervisor开机启动
新建一个“supervisord.service”文件
# dservice for systemd (CentOS 7.0+)
# by ET-CS (https://github.com/ET-CS)
[Unit]
Description=Supervisor daemon
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
ExecStop=/usr/bin/supervisorctl shutdown
ExecReload=/usr/bin/supervisorctl reload
KillMode=process
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
将文件拷贝至:“/usr/lib/systemd/system/supervisord.service”
执行命令:systemctl enable supervisord
配置守护
新增配置
vim /etc/supervisor/conf.d/acore.dll.conf
[program:acore.dll]
command=/bin/bash -c "dotnet acore.dll server.urls=http://127.0.0.1:3000/"
directory=/root/dotnetcore/acore/
autorestart=false
stderr_logfile=/var/log/acore.dll.err.log
stdout_logfile=/var/log/acore.dll.out.log
environment=ASPNETCORE_ENVIRONMENT=Development
user=root
stopsignal=INT
重加载配置
supervisorctl reload
supervisorctl start acore.dll
查看是否被守护进程拉起
重启电脑查看是否自动启动
访问站点OK
Supervisor 守护 dotnetcore 程序的更多相关文章
- 【转载】Centos7 中使用Supervisor守护进程
配置supervisor实现进程守护 1.安装supervisor yum install Supervisor 2.启动服务 supervisord -c /etc/supervisord.co ...
- Centos7 中使用Supervisor守护进程
转:https://www.cnblogs.com/qmhuang/p/8196132.html 配置supervisor实现进程守护 1.安装supervisor yum install Super ...
- Centos7 使用 Supervisor 守护进程 Celery
一.Supervisor 安装(centos7 还有另一个进程守护命令 Systemd ) Centos 7 安装 Supervisord 二.Supervisor 守护进程 Centos7 使用 S ...
- 【Centos7】 中使用Supervisor守护进程
原文出处: Centos7 中使用Supervisor守护进程 配置supervisor实现进程守护 1.安装supervisor yum install Supervisor 2.启动服务 su ...
- supervisor守护filebeat服务进程
1.变更原因 部署安装supervisor进行filebeat守护及后面的各种服务进程守护可以用2.变更内容增加supervisor服务 3.变量时间:6月2号-6月3号4.变更风险评估:无风险4.1 ...
- Python编写守护进程程序
Python编写守护进程程序思路 1. fork子进程,父进程退出通常,我们执行服务端程序的时候都会通过终端连接到服务器,成功连接后会加载shell环境,终端和shell都是进程,shell进程是终端 ...
- Centos7 使用Dockerfile 制作自己的Dotnetcore程序镜像
准备Centos7环境及Docker环境 从Docker hub拉取 Microsoft/dotnet 基础镜像(可以使用国内加速) 向Centos7指定目录上传Dotnet Core程序,目录: / ...
- jenkins结合supervisor进行python程序发布后的自动重启
jenkins结合supervisor进行python程序发布后的自动重启 项目背景: 通过jenkins发布kvaccount.chinasoft.com站点的python服务端程序,业务部门同事需 ...
- 使用supervisor支持Python3程序 (解决找不到Module的问题)
Supervisor是python2写就的一款强大的运维工具(其实现在已经支持Python3了 https://github.com/Supervisor/supervisor)那么怎么利用Super ...
随机推荐
- Android属性动画完全解析(上)
Android属性动画完全解析(上) 转载:http://blog.csdn.net/guolin_blog/article/details/43536355 在手机上去实现一些动画效果算是件比较炫酷 ...
- java提高篇---ArrayList
一.ArrayList概述 ArrayList是实现List接口的动态数组,所谓动态就是它的大小是可变的.实现了所有可选列表操作,并允许包括 null 在内的所有元素.除了实现 List 接口外,此类 ...
- CentOS6 启动流程图文解剖
我们在使用Linux操作系统的时候,我们只需按下电源键,等待,然后输入账户和密码就可以使用Linux操作系统了.那么在按下电源到输入账号和密码之前,操作系统都做了些什么?下面就来讲述在这段时间发生的动 ...
- 关于C指针
地址概念:内存基本单元是一个字节,一个字节8个位.在定义变量的时候,如int a=10:系统为变量a分配2个字节空间:1000~1001,并在1001~1002中存有数据10.内存中没有变量a,只有1 ...
- SqlSever基础 datepart 获取一个日期的年份
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...
- ruby学习总结03
1.方法的调用 对象.方法名(参数1,参数2,...) 可以省略参数列表的() 对象.方法名(参数1,...) do |变量1,变量2,...| 可以省略参数的() 块内 ...
- oracle分组统计某列逗号隔开数据
所有版本的oracle都可以使用select wm_concat(name) as name from user; 但如果是oracle11g,使用select listagg(name, ',') ...
- hdu 2112 (最短路+map)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2112 HDU Today Time Limit: 15000/5000 MS (Java/Others) ...
- HDU 5831 Rikka with Parenthesis II(六花与括号II)
31 Rikka with Parenthesis II (六花与括号II) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536 ...
- CSS笔记(五)字体
CSS 字体属性定义文本的字体系列.大小.加粗.风格(如斜体)和变形(如小型大写字母). 参考:http://www.w3school.com.cn/css/css_font.asp CSS字体系列 ...