我有一个 C 程序,我想将它作为守护程序运行。如何安装它以便它在 CentOS 上作为守护程序运行?有人说要用@reboot,有人说要放进去/etc/rc.d/rc.local。哪个是正确的方法?
@reboot
/etc/rc.d/rc.local
c centos daemon
c ×1
centos ×1
daemon ×1