We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在某些情况下,如需要部署一个可持久运行的服务时,可以创建 systemctl 实现自动登录,和便捷的启动和关闭。
首先找到服务文件的存储路径,并创建一个服务文件 [服务名称].service 。
[服务名称].service
systemd 服务文件可以保存到多个不同的目录,我个人偏向保存在 /usr/lib/systemd/system/ 目录中。
5/3/2022 修改:现在默认写到 /etc/systemmd/system/ 目录
[Unit] Description=A simple program [Service] ExecStart=/PATH_TO_PROGRAM/example
待施工。。。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
描述
在某些情况下,如需要部署一个可持久运行的服务时,可以创建 systemctl 实现自动登录,和便捷的启动和关闭。
实现案例
首先找到服务文件的存储路径,并创建一个服务文件
[服务名称].service
。5/3/2022 修改:现在默认写到 /etc/systemmd/system/ 目录
待施工。。。
The text was updated successfully, but these errors were encountered: