Home >System Tutorial >LINUX >How to install custom system services in CentOS 7?

How to install custom system services in CentOS 7?

WBOY
WBOYforward
2024-01-04 15:25:431323browse

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!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete