systemctl automatically restart service
systemctl automatically restart service
References:
- Ensure systemd services restart on failure by Jon Archer
- php-fpm systemd unit with auto-restart by Juan Luis Boya García
- systemd Project Web Page
systemd is a system and service manager that runs as PID 1 and starts the rest of the system and services. The main command used to introspect and control systemd is systemctl.
Basically do the following to let a service restart automatically…
- Edit /lib/systemd/system/name.service file
- Insert “Restart=on-failure” under the section “Service”. Save the file
- Execute the command… systemctl daemon-reload
- Execute the command… systemctl restart name_of_the_service
- (optional) try killing the process now
See https://wiki.archlinux.org/index.php/Systemd#Examples for more examples.
systemctl automatically restart service的更多相关文章
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control ...
- Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...
- Centos7下的systemctl命令与service和chkconfig
博主使用的操作系统是最新的CentOS 7,所以可能和网上一些老的博文有一定出入,那是因为版本更新的原因. 这里写图片描述1 service service命令用于对系统服务进行管理,比如启动(sta ...
- 通过 systemctl 设置自定义 Service
如果要在Linux 上设置一个开机自启,出现问题自动重启,并且有良好日志的程序,比较流行的方法有 supervisord.systemd,除此之外,还有 upstart.runit 等类似的工具. 但 ...
- systemctl enable rc-local.service error
/******************************************************************************* * systemctl enable ...
- 启动Nginx服务失败:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
首次接触nginx,安装完使用命令 service nignx restart 后,出现这个错误,并按照提示给出的命令查看错误详情 systemctl status nginx.service ...
- 对比centos7的systemctl和其他service+chkconfig
syetemctl就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了.systemctl 是系统服务管理器命令,它实际上将 service 和 chkconfig ...
- 有关linux中出现systemctl status network.service" and "journalctl -xe" for details.
Job for network.service failed because the control process exited with error code >**[root@mina0 ...
- Linux系统Docker启动问题Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service"
在Liunx中使用Docker, 注: Liunx使用的是在虚拟机下的centOS7版本在刚开始安装Docker时没有任何错误, 但是在后续的docker启动过程中, 出现以下问题: [root@zk ...
随机推荐
- 阿里云Centos 7.6安装Redis以及开启远程连接
下载地址:http://redis.io/download,下载最新稳定版本. 本教程使用的最新文档版本为 5.0.5,下载并安装: $ wget http://download.redis.io/r ...
- eclipse运行mapreduce的wordcount
1,eclipse安装hadoop插件 插件下载地址:链接: https://pan.baidu.com/s/1U4_6kLFNiKeLsGfO7ahXew 提取码: as9e 下载hadoop-ec ...
- codevs 2853:方格游戏
(排版没搞好,这一行用来卖萌~) 题目描述 Description 菜菜看到了一个游戏,叫做方格游戏~ 游戏规则是这样的: 在一个n*n的格子中,在每个1*1的格子里都能获得一定数量的积分奖励,记左上 ...
- 《你必须知道的495个C语言问题》读书笔记之第11-14章:ANSI C标准、库函数、浮点数
一.ANSI C标准 1. ANSI向C语言预处理器引入了几项新的功能,包括“字符串化”操作符(#).“符号粘贴”操作符(##).#pragma指令. 2. Q:char a[3] = "a ...
- *#【Python】【基础知识】【模块】【tkinter】【学用tkinter画图/制作窗口】
Python 提供了多个图形开发界面的库,几个常用 Python GUI 库如下: Tkinter: Tkinter 模块(Tk 接口)是 Python 的标准 Tk GUI 工具包的接口 . Tk ...
- [百度贴吧]飞腾1500a .VS. 龙芯3a3000: 同频实用性能对比
贴吧关于 龙芯与飞腾的简单对比. https://tieba.baidu.com/p/5682824804?red_tag=0221728732 龙芯3a3000实用性能 ,还不如4年前发布的FT15 ...
- idea调试框架时如何能够进入maven依赖包的源码
最近用idea使用spring security做登录与权限控制,在调试过程中碰到问题,经常需要断点追踪源码,深入查看其中问题.但是maven中引用的包,进入后都是.class文件,非源码.导致查看时 ...
- Do Not Try This Problem(分块思想)
题意:https://codeforces.com/group/ikIh7rsWAl/contest/259944/problem/D 给你q个操作,4个数n,a,k,c,从n好位置开始每次加a的位置 ...
- IntelliJ IDEA 搭建 Go 开发环境
本文介绍 Windows7 x64 基于 IntelliJ IDEA 搭建 Go 语言开发环境.主要是一些操作过程截图以及简单文字描述,如有不清楚的地方,欢迎指正.所有软件使用当前(2016.12. ...
- js 中, set 与 数组 相互转换
主要用 Array.from 方法 1.array --> set (数组转set) let array = [1, 2, 3, 4]; let set = new Set(array); 2. ...