Centos7 startup items are divided into two types: system and user
For example, mysql, which can be run without logging in, is system type and is placed under /usr/lib/systemd/system. On the contrary, programs that can only be run after the user logs in are stored in the user (user).
If I customize a system service called mytest.server, the file format can refer to other files in the system directory.
Execute systemctl enable mytest.service to set auto-start at boot
systemctl start mytest.service Start the service
systemctl status mytest.service View status
View boot items
systemctl list-unit-files
The above is the detailed content of How to install custom system services in CentOS 7?. For more information, please follow other related articles on the PHP Chinese website!