设为首页 收藏本站
查看: 471|回复: 0

[经验分享] systemd之Centos服务管理

[复制链接]

尚未签到

发表于 2018-4-21 07:21:51 | 显示全部楼层 |阅读模式
  

  

  

  systemd 架构图
  

  

  

DSC0000.png

  

  

  

  

Systemd
  https://www.freedesktop.org/software/systemd/

  http://www.jinbuguo.com/systemd/systemd.html
  

中文手册
  https://www.ibm.com/developerworks/cn/linux/1407_liuming_init3/
浅析systemd


  https://www.freedesktop.org/wiki/Software/systemd/



  http://www.ruanyifeng.com/blog/2016/03/systemd-tutorial-commands.html
systemd 命令详解 (赞)


  http://blog.jobbole.com/97248/
简明介绍 systemd


  systemd提供更优秀的框架以表示系统服务间的依赖关系
实现系统初始化时服务的并行启动,同时达到降低Shell的系统开销的效果
systemd的目标是:尽可能启动更少进程;尽可能将更多进程并行启动。
systemd尽可能减少对shell脚本的依赖。
  

  

  systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux control groups, maintains mount and automount points, and implements an elaborate transactional dependency-based service control logic. systemdsupports SysV and LSB init scripts and works as a replacement for sysvinit. Other parts include a logging daemon, utilities to control basic system configuration like the hostname, date, locale, maintain a list of logged-in users and running containers and virtual machines, system accounts, runtime directories and settings, and daemons to manage simple network configuration, network time synchronization, log forwarding, and name resolution. See Lennart's blog story for a longer introduction, and the three status updates since then. Also see the Wikipedia article. If you are wondering whether systemd is for you, please have a look at this comparison of init systems by one of the creators of systemd.
  

  

  

  

  

Systemd 的简介和特点
[size=1.166em]Systemd 是 Linux 系统中最新的初始化系统(init),它主要的设计目标是克服 sysvinit 固有的缺点,提高系统的启动速度。systemd 和 ubuntu 的 upstart 是竞争对手,预计会取代 UpStart,实际上在作者写作本文时,已经有消息称 Ubuntu 也将采用 systemd 作为其标准的系统初始化系统。
[size=1.166em]Systemd 的很多概念来源于苹果 Mac OS 操作系统上的 launchd,不过 launchd 专用于苹果系统,因此长期未能获得应有的广泛关注。Systemd 借鉴了很多 launchd 的思想,它的重要特性如下:
同 SysVinit 和 LSB init scripts 兼容
[size=1.166em]Systemd 是一个"新来的",Linux 上的很多应用程序并没有来得及为它做相应的改变。和 UpStart 一样,systemd 引入了新的配置方式,对应用程序的开发也有一些新的要求。如果 systemd 想替代目前正在运行的初始化系统,就必须和现有程序兼容。任何一个 Linux 发行版都很难为了采用 systemd 而在短时间内将所有的服务代码都修改一遍。
[size=1.166em]Systemd 提供了和 Sysvinit 以及 LSB initscripts 兼容的特性。系统中已经存在的服务和进程无需修改。这降低了系统向 systemd 迁移的成本,使得 systemd 替换现有初始化系统成为可能。
更快的启动速度
[size=1.166em]Systemd 提供了比 UpStart 更激进的并行启动能力,采用了 socket / D-Bus activation 等技术启动服务。一个显而易见的结果就是:更快的启动速度。
[size=1.166em]为了减少系统启动时间,systemd 的目标是:

  •   尽可能启动更少的进程
  •   尽可能将更多进程并行启动
  

  https://blog.linuxeye.cn/400.html
  

  

  
CentOS 7 巨大变动之 systemd 取代 SysV的Init
  http://blog.csdn.net/smstong/article/details/39317491
  

  

  

  

  常用命令
  

  开机不启动unit
  systemctl disable httpd.service
  删除/etc/systemd/system/multi-user.target.wants下的软链接
  查看开机是否启动
  systemctl is-enabled xx.service #查询服务是否开机启动
  systemd查看开机自启动的程序
  相当于chkconfig --list
  ls /etc/systemd/system/multi-user.target.wants/
  查看systemd单元加载及活动情况
  systemctl
  显示启动失败的单元
  systemctl --failed
  查看systemd管理的所有单元
  systemctl list-unit-files
  

  

  http://www.linuxidc.com/Linux/2016-04/130413.htm
  

  http://www.linuxidc.com/Linux/2015-04/116648.htm
  

  

   初次体验CentOS 7的systemd
  http://carllai.blog.51cto.com/1664997/1439562/
  

  

  

  

  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-449780-1-1.html 上篇帖子: 安装CentOS7(文) 下篇帖子: Centos7 系统安全事故处理案例
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表