查看开机启动项

systemctl list-unit-files |   grep enable

为服务添加开机启动项

systemctl enable zabbix-server.service

移除开机启动项的服务

[[email protected] bin]# systemctl disable zabbix-server.service
Removed symlink /etc/systemd/system/multi-user.target.wants/zabbix-server.service.
 

减价修改自定义开机启动的脚本

修改 /etc/rc.d/rc.local 这个文件

例如将 apache、mysql、samba、svn 等这些服务的开机自启动问题一起搞定:

[[email protected] ~]# vim /etc/rc.d/rc.local

#添加以下命令

/usr/sbin/apachectl start

/etc/rc.d/init.d/mysqld start

/etc/rc.d/init.d/smb start

/usr/local/subversion/bin/svnserve -d

 

reboot 重启!

Centos7设置SpringBoot项目开机启动

Centos7设置SpringBoot项目开机启动

 

相关文章:

  • 2022-01-10
  • 2021-06-09
  • 2021-11-15
  • 2021-07-19
  • 2021-11-29
  • 2021-10-27
  • 2022-12-23
  • 2022-02-10
猜你喜欢
  • 2021-11-19
  • 2022-12-23
  • 2022-01-13
  • 2021-10-11
  • 2021-07-24
  • 2021-09-27
  • 2022-02-10
相关资源
相似解决方案