旅游景区网站源码,网销是做什么的,网站怎么样做不违规,做宠物的网站引言
systemctl 是 Linux 系统中用于管理 systemd 服务的命令行工具。它可以用来启动、停止、重启服务#xff0c;管理服务的开机自启动#xff0c;以及查看服务的状态等。 什么是 systemd#xff1f; systemd 是现代 Linux 发行版中默认的 初始化系统#xff08;init sys…引言
systemctl 是 Linux 系统中用于管理 systemd 服务的命令行工具。它可以用来启动、停止、重启服务管理服务的开机自启动以及查看服务的状态等。 什么是 systemd systemd 是现代 Linux 发行版中默认的 初始化系统init system负责在系统启动时加载和管理服务与进程。 适用范围 systemctl 可用于大多数基于 systemd 的 Linux 发行版如 Debian、Ubuntu、CentOS、Fedora 等。 (比如Gentoo默认使用的是OpenRC)
解决方法
这边以mysql服务为例
禁用开机自启 sudo systemctl disable mysql ying192:~$ systemctl disable mysql.service
Removed /etc/systemd/system/multi-user.target.wants/mysql.service.
查看是否禁用成功(如果为disable则以禁用开机自启动) systemctl is-enabled mysql ying192:~$ systemctl is-enabled mysql
disabled
扩展
如果只是暂时需要关闭服务那么使用stop sudo systemctl stop mysql 如果需要开启那么使用start sudo systemctl start mysql 查询服务的运行状态使用status sudo systemctl status mysql