首先根据官方文档安装 MCSManager 镜像
注册到 Linux 系统服务
配置 vim /etc/systemd/system/mcsm-daemon.service
[Unit]
Description=MCSManager Daemon
Requires=docker.service
After=docker.service[Service]
Restart=always
ExecStart=/usr/bin/docker start -a mcsmv10_daemon
ExecReload=/usr/bin/docker restart mcsmv10_daemon
ExecStop=/usr/bin/docker stop mcsmv10_daemon[Install]
WantedBy=multi-user.target
配置 vim /etc/systemd/system/mcsm-web.service
[Unit]
Description=MCSManager Web
Requires=docker.service
After=docker.service[Service]
Restart=always
ExecStart=/usr/bin/docker start -a mcsmv10_web
ExecReload=/usr/bin/docker restart mcsmv10_web
ExecStop=/usr/bin/docker stop mcsmv10_web[Install]
WantedBy=multi-user.target
命令用法
重启:systemctl restart mcsm-{daemon,web}.service
启动:systemctl start mcsm-{daemon,web}.service
停止:systemctl stop mcsm-{daemon,web}.service
禁用:systemctl disable mcsm-{daemon,web}.service
启用:systemctl enable mcsm-{daemon,web}.service
发表回复