• .NET Core


    sudo yum update
    sudo yum install libunwind libicu
    sudo yum install dotnet-sdk-2.1.3  #最新版本请关注官网
    sudo yum install dotnet-sdk-2.1 #注意自己版本
    dotnet /usr/mytest/demo.dll 
    安装supervisor守护进程,保证程序持续运行
    yum install python-setuptools
    easy_install supervisor
    mkdir /etc/supervisor #创建文件夹
    echo_supervisord_conf > /etc/supervisor/supervisord.conf #创建supervisor的conf
    [include]
    files = conf.d/*.conf #在文件尾部改为
    mkdir /etc/supervisor/conf.d #创建con.d文件夹 用来保存项目的conf
    conf示例

    [program:MySecondCore]
    command=dotnet /usr/luolai/XLSTest/MySecondCore.dll
    directory=/usr/luolai/XLSTest/
    autorestart=true
    autorestart=true
    stderr_logfile=/var/log/MySecondCore.err.log
    stdout_logfile=/var/log/MySecondCore.out.log
    environment=ASPNETCORE_ENVIRONMENT=Production
    user=root
    stopsignal=INT

    supervisord -c /etc/supervisor/supervisord.conf #启动 Supervisor 服务

    设置 Supervisor 开机启动

    首先为 Supervisor 新建一个启动服务脚本supervisor.service,然后保存并上传至服务器/usr/lib/systemd/system/目录。

    脚本内容如下:

    supervisord service 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 $OPTIONS shutdown
    ExecReload=/usr/bin/supervisorctl $OPTIONS reload
    KillMode=process
    Restart=on-failure
    RestartSec=42s
    
    [Install]
    WantedBy=multi-user.target
    设为开机启动
    systemctl enable supervisor
    来源:https://www.cnblogs.com/liuxiaoji/p/9907984.html

    
    
  • 相关阅读:
    ZOJ Problem Set–2781 Rounders
    ZOJ Problem Set 3418 Binary Number
    ZOJ Problem Set 1090 The Circumference of the Circle
    ZOJ Problem Set 2932 The Seven Percent Solution
    java的反射应用
    C++指针之数据成员指针
    为了实现相同账号不能重复登录功能做的努力
    我对设计模式的理解
    ZOJ Problem Set – 1045 HangOver
    好久不见
  • 原文地址:https://www.cnblogs.com/18553325o9o/p/10310901.html
Copyright © 2020-2023  润新知