|
|
@ -27,7 +27,6 @@ cd /var/syzoj-judge-v3 |
|
|
|
cp daemon-config-example.json /etc/syzoj-config/daemon.json |
|
|
|
cp daemon-config-example.json /etc/syzoj-config/daemon.json |
|
|
|
cp runner-shared-config-example.json /etc/syzoj-config/runner-shared.json |
|
|
|
cp runner-shared-config-example.json /etc/syzoj-config/runner-shared.json |
|
|
|
cp runner-instance-config-example.json /etc/syzoj-config/runner-instance1.json |
|
|
|
cp runner-instance-config-example.json /etc/syzoj-config/runner-instance1.json |
|
|
|
cp frontend-config-example.json /etc/syzoj-config/frontend.json |
|
|
|
|
|
|
|
cp /var/syzoj-web/config-example.json /etc/syzoj-config/web.json |
|
|
|
cp /var/syzoj-web/config-example.json /etc/syzoj-config/web.json |
|
|
|
``` |
|
|
|
``` |
|
|
|
## 创建 systemd 系统服务 |
|
|
|
## 创建 systemd 系统服务 |
|
|
@ -64,23 +63,6 @@ User=syzoj |
|
|
|
Group=syzoj |
|
|
|
Group=syzoj |
|
|
|
ExecStart=/usr/bin/node /var/fair-judge-v3/lib/daemon/index.js -c /etc/syzoj-config/daemon.json |
|
|
|
ExecStart=/usr/bin/node /var/fair-judge-v3/lib/daemon/index.js -c /etc/syzoj-config/daemon.json |
|
|
|
|
|
|
|
|
|
|
|
[Install] |
|
|
|
|
|
|
|
WantedBy=multi-user.target |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
syzoj-judge-frontend.service |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
[Unit] |
|
|
|
|
|
|
|
Description=SYZOJ Judge Frontend |
|
|
|
|
|
|
|
After=network.target rabbitmq-server.service |
|
|
|
|
|
|
|
Requires=syzoj-web.service rabbitmq-server.service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Service] |
|
|
|
|
|
|
|
Type=simple |
|
|
|
|
|
|
|
WorkingDirectory=/var/fair-judge-v3 |
|
|
|
|
|
|
|
User=syzoj |
|
|
|
|
|
|
|
Group=syzoj |
|
|
|
|
|
|
|
ExecStart=/usr/bin/node /var/fair-judge-v3/lib/frontend-syzoj/index.js -c /etc/syzoj-config/frontend.json |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Install] |
|
|
|
[Install] |
|
|
|
WantedBy=multi-user.target |
|
|
|
WantedBy=multi-user.target |
|
|
|
``` |
|
|
|
``` |
|
|
@ -115,8 +97,8 @@ mkdir /home/syzoj |
|
|
|
chown -R syzoj:syzoj /mnt/syzoj-data |
|
|
|
chown -R syzoj:syzoj /mnt/syzoj-data |
|
|
|
chown -R syzoj:syzoj /mnt/syzoj-bin |
|
|
|
chown -R syzoj:syzoj /mnt/syzoj-bin |
|
|
|
chown -R syzoj:syzoj /mnt/syzoj-tmp1 |
|
|
|
chown -R syzoj:syzoj /mnt/syzoj-tmp1 |
|
|
|
chown -R syzoj:syzoj /var/syzoj-web |
|
|
|
chown -R syzoj:syzoj /var/fair-web |
|
|
|
chown -R syzoj:syzoj /var/syzoj-judge-v3 |
|
|
|
chown -R syzoj:syzoj /var/fair-judge-v3 |
|
|
|
chown -R syzoj:syzoj /home/syzoj |
|
|
|
chown -R syzoj:syzoj /home/syzoj |
|
|
|
``` |
|
|
|
``` |
|
|
|
配置临时目录 |
|
|
|
配置临时目录 |
|
|
|