笔记笔记
  • Home
  • AI&ML
  • Example
  • Zoo
  • 关于
⌘ K
Ubuntu
NVIDIA
Python 环境
systemctl
最后更新时间:
Copyright © 2023-2024 | Powered by dumi | GuoDapeng | 冀ICP备20004032号-1 | 冀公网安备 冀公网安备 13024002000293号

TABLE OF CONTENTS

‌
‌
‌
‌

systemctl

struct_bert.service 文件内容。

[Unit]
Description=StructBERT API
[Service]
ExecStart=bash /home/admin1/work/StructBERT/start.sh
[Install]
WantedBy=multi-user.target

常用操作

# 复制文件到对应位置
cp struct_bert.service /etc/systemd/system/
# 重新加载
systemctl daemon-reload
# 设置开机启动
systemctl enable struct_bert.service
# 取消开机启动
systemctl disable struct_bert.service
# 启动
systemctl start struct_bert.service
# 停止
systemctl stop struct_bert.service
# 查看状态
systemctl status struct_bert.service
# 查看日志
journalctl -u struct_bert.service