systemd之Centos服务管理

简介:


systemd 架构图




bg2016030703.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 的简介和特点

Systemd 是 Linux 系统中最新的初始化系统(init),它主要的设计目标是克服 sysvinit 固有的缺点,提高系统的启动速度。systemd 和 ubuntu 的 upstart 是竞争对手,预计会取代 UpStart,实际上在作者写作本文时,已经有消息称 Ubuntu 也将采用 systemd 作为其标准的系统初始化系统。

Systemd 的很多概念来源于苹果 Mac OS 操作系统上的 launchd,不过 launchd 专用于苹果系统,因此长期未能获得应有的广泛关注。Systemd 借鉴了很多 launchd 的思想,它的重要特性如下:

同 SysVinit 和 LSB init scripts 兼容

Systemd 是一个"新来的",Linux 上的很多应用程序并没有来得及为它做相应的改变。和 UpStart 一样,systemd 引入了新的配置方式,对应用程序的开发也有一些新的要求。如果 systemd 想替代目前正在运行的初始化系统,就必须和现有程序兼容。任何一个 Linux 发行版都很难为了采用 systemd 而在短时间内将所有的服务代码都修改一遍。

Systemd 提供了和 Sysvinit 以及 LSB initscripts 兼容的特性。系统中已经存在的服务和进程无需修改。这降低了系统向 systemd 迁移的成本,使得 systemd 替换现有初始化系统成为可能。

更快的启动速度

Systemd 提供了比 UpStart 更激进的并行启动能力,采用了 socket / D-Bus activation 等技术启动服务。一个显而易见的结果就是:更快的启动速度。

为了减少系统启动时间,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/


      本文转自heavenseahill 51CTO博客,原文链接:http://blog.51cto.com/shower/1972717,如需转载请自行联系原作者





相关文章
|
2月前
|
Java Linux Shell
linux自动部署jar包,注册系统服务(基于Centos7)
linux自动部署jar包,注册系统服务(基于Centos7)
91 0
|
4月前
|
网络协议 Linux Shell
CentOS 7系统下DHCP及中继服务部署
设备 IP地址 主DNS服务器 192.168.100.254 从DNS服务器 192.168.100.1 客户端 192.168.200.2 一、DHCP服务器的部署
119 0
|
6月前
|
JSON Linux 数据格式
百度搜索:蓝易云【Centos 7 通过 targz 文件安装 Elastic Search 服务教程!】
请注意,本教程提供了基本的安装步骤,并且可以根据实际需求进行定制和配置。如果需要更深入的了解和配置,请参考Elasticsearch官方文档或其他权威资源。
283 0
|
6月前
|
安全 Linux 网络安全
Centos 6.8下修改SSH服务默认端口,看这一篇就够了
Centos 6.8下修改SSH服务默认端口,看这一篇就够了
127 0
|
4月前
|
Kubernetes Ubuntu 安全
Linux|科普扫盲帖|配置网络软件源---阿里云镜像仓库服务使用(centos,Ubuntu)
Linux|科普扫盲帖|配置网络软件源---阿里云镜像仓库服务使用(centos,Ubuntu)
570 0
|
2天前
|
运维 网络协议 Linux
【运维系列】Centos7安装并配置PXE服务
PXE是Intel开发的预启动执行环境,允许工作站通过网络从远程服务器启动操作系统。它依赖DHCP分配IP,DNS服务分配主机名,TFTP提供引导程序,HTTP/FTP/NFS提供安装源。要部署PXE服务器,需关闭selinux和防火墙,安装dhcpd、httpd、tftp、xinetd及相关服务,配置引导文件和Centos7安装源。最后,通过syslinux安装引导文件,并创建pxelinux.cfg/default配置文件来定义启动参数。
10 0
|
2天前
|
运维 网络协议 Linux
【运维系列】Centos7安装并配置postfix服务
安装CentOS7的Postfix和Dovecot,配置Postfix的`main.cf`文件,包括修改完全域名、允许所有IP、启用邮箱等。然后,配置Dovecot的多个配置文件以启用auth服务和调整相关设置。重启Postfix和Dovecot,设置开机自启,并关闭防火墙进行测试。最后,创建邮箱账户并在Windows邮箱客户端中添加账户设置。
9 0
|
2天前
|
Linux 网络安全
Centos6.5安装并配置NFS服务
该内容描述了在Linux系统中设置NFS服务的步骤。首先挂载yum源,然后安装NFS服务,并编辑配置文件。接着,重启rpcbind和NFS服务,可能需要重复此过程以解决初始可能出现的问题。此外,关闭防火墙策略,并再次重启服务。最终,根目录被共享,特定IP网段被允许访问。
9 0
|
2月前
|
数据可视化 数据挖掘 Linux
如何在CentOS安装DataEase数据分析服务并实现远程访问管理界面
如何在CentOS安装DataEase数据分析服务并实现远程访问管理界面
226 1
|
2月前
|
存储 Java Linux
CentOS软件包管理
CentOS软件包管理
66 0

热门文章

最新文章