博客
关于我
鸟哥私房菜第18章——认识系统服务
阅读量:522 次
发布时间:2019-03-08

本文共 847 字,大约阅读时间需要 2 分钟。

daemon服务管理在Linux系统中是一个关键的技术主题,以下内容将围绕daemon服务的配置与管理进行详细阐述

daemon服务的分类与特点

在Linux系统中,daemon服务通常分为两类:独立服务和通过超级daemon管理的服务

独立服务特点:

  • 通常已预先加载内存
  • 24/7不间歇运行
  • 对客户端请求响应速度较快

超级daemon管理服务特点:

  • 通过统一的超级daemon协调服务启动
  • 服务在无客户端请求时处于未启动状态
  • 超级daemon持续驻留内存

系统服务配置文件位置

常见的配置文件分布如下:

  • /etc/init.d/: 启动脚本存储地点
  • /etc/sysconfig/: 系统服务初始环境配置
  • /etc/xinetd.conf: 主要配置文件
  • /etc/xinetd.d/: 辅助配置文件存储

启动脚本执行过程

在/etc/init.d/目录下的启动脚本会执行以下功能:

  • 检测运行环境
  • 查找配置文件
  • 加载分布功能宏
  • 判断环境是否适合运行daemon

服务操作命令:

  • service servicename {start | stop | restart}
  • service --status-all显示所有服务状态

超级daemon配置与验证

要确认超级daemon管理的服务是否已启动,可通过以下命令判断:$ grep -i 'disable' /etc/xinetd.d/若发现'disable=yes',表示服务未启动;反之则表示已启用

超级daemon配置文件详细信息可参考P559

Linux系统开机流程解析

系统开机步骤一般包括:

  • BIOS自我测试启动
  • 加载启动装载程序并执行
  • 加载kernel并检测硬件
  • 启动init程序
  • init执行系统初始化
  • daemon服务启动
  • 加载本地设备设置
  • 默认服务启动与管理

    使用chkconfig进行服务管理

    • 图形界面模式:ntsysv
    • 服务设置:chkconfig指令

    以上内容全面介绍了daemon服务的分类、配置管理及相关工作流程

    转载地址:http://hymnz.baihongyu.com/

    你可能感兴趣的文章
    npm ERR! Unexpected end of JSON input while parsing near '...on":"0.10.3","direc to'
    查看>>
    npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp
    查看>>
    npm error Missing script: “server“npm errornpm error Did you mean this?npm error npm run serve
    查看>>
    npm error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装
    查看>>
    npm install CERT_HAS_EXPIRED解决方法
    查看>>
    npm install digital envelope routines::unsupported解决方法
    查看>>
    npm install 卡着不动的解决方法
    查看>>
    npm install 报错 EEXIST File exists 的解决方法
    查看>>
    npm install 报错 ERR_SOCKET_TIMEOUT 的解决方法
    查看>>
    npm install 报错 Failed to connect to github.com port 443 的解决方法
    查看>>
    npm install 报错 fatal: unable to connect to github.com 的解决方法
    查看>>
    npm install 报错 no such file or directory 的解决方法
    查看>>
    npm install 权限问题
    查看>>
    npm install报错,证书验证失败unable to get local issuer certificate
    查看>>
    npm install无法生成node_modules的解决方法
    查看>>
    npm install的--save和--save-dev使用说明
    查看>>
    npm node pm2相关问题
    查看>>
    npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
    查看>>
    npm run build报Cannot find module错误的解决方法
    查看>>
    npm run build部署到云服务器中的Nginx(图文配置)
    查看>>