一、centos7、red hat7 取消了运行级别的概念,用systemd代替了init中的运行级别概念。

二、用“ln”命令把“多用户,无图形”目标文件链接到/etc/systemd/system/目录中:
# ln -sf /lib/systemd/system/multi-user.target
/etc/systemd/system/default.target 注:实现开机进入命令行界面。

三、使用“systemctl”命令管理服务
systemctl star 服务名.service 启动服务
systemctl restart 服务名.service 重启服务
systemctl stop 服务名.service 停止服务
systemctl reload 服务名.service 重新加载配置文件(不终止服务)
systemctl status 服务名.service 查看服务状态

四、使用“systemctl”设置开机启动、不启动、查看各级别下服务启动状态
systemctl enable 服务名.service 开机自启服务
systemctl disable 服务名.service 开启不自启服务
systemctl is-enabled 服务名.service 查看特定服务是否开机自启
systemctl list-unit-files --type=service 查看各级别下服务启动与禁用情况

友情链接
ioDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信