- linux下服务的定义在 /lib/systemd/system 中,我们只需要编写符合标准规范的service脚本文件,放在这个文件夹下面即可。
- 服务启动相关
- 编写服务设置启动
- rc.local中设置开机启动
- 参考
systemctl list-unit-files enabled:开机启动 disabled:开机不启动 [ sysadmin:~ ]# systemctl list-unit-files UNIT FILE STATE proc-sys-fs-binfmt_misc.automount static dev-hugepages.mount static dev-mqueue.mount static proc-fs-nfsd.mount static proc-sys-fs-binfmt_misc.mount static run-vmblockx2dfuse.mount disabled sys-fs-fuse-connections.mount static sys-kernel-config.mount static sys-kernel-debug.mount static tmp.mount disabled var-lib-nfs-rpc_pipefs.mount static brandbot.path disabled cups.path enabled systemd-ask-password-console.path static systemd-ask-password-plymouth.path static systemd-ask-password-wall.path static docker-1558df48f7364a8b70979495e804e434834f7624253ca6651eabb9d0af30b221.scope static
设置docker服务开机启动 systemctl enable docker 开机不启动 systemctl disable dockerrc.local中设置开机启动 参考
Linux下服务的创建
linux 7服务取消开机自启,centos7中设置服务开机自启的两种方法,欢迎补充



