守护进程
服务程序一般都是以守护进程默默的在后台执行,所以一般都是以d结尾的,在Linux中所有的进程都是由初始化进程来创建的,该初始化进程的进程号是1,在之前的版本中初始化进程是system V,新版的初始化进程是systemd
| systemd | systemV | 描述 |
|---|---|---|
systemctl start 服务 |
service 服务 start |
启动服务 |
systemctl stop 服务 |
service 服务 stop |
停止服务 |
systemctl restart 服务 |
service 服务 restart |
重启服务 |
systemctl status 服务 |
service 服务 status |
查看服务状态 |
systemctl reload 服务 |
service 服务 reload |
重服务载配置文件 |
systemctl enable 服务 |
chkconfig 服务 on |
将该服务添加到开机自启动 |
systemctl disable 服务 |
chkconfig 服务 off |
将该服务移除开机自启动 |
systemctl is-enable 服务 |
chkconfig 服务 |
查看该服务是否开机自启动 |
systemctl list-unit-files --type=service |
chkconfig --list |
查看各个级别下服务的启动和禁用状态 |

Comments NOTHING