File tree Expand file tree Collapse file tree 3 files changed +43
-6
lines changed Expand file tree Collapse file tree 3 files changed +43
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,13 @@ export default defineUserConfig({
67
67
editLink : true ,
68
68
sidebar : {
69
69
'/index' : [
70
- { text : '常见问题' , children : [ '/FAQ/' ] } ,
70
+ {
71
+ text : '常见问题' ,
72
+ children : [
73
+ '/FAQ/' ,
74
+ '/FAQ/upgrade' ,
75
+ ]
76
+ } ,
71
77
] ,
72
78
'/docs/' : [
73
79
{
Original file line number Diff line number Diff line change 59
59
60
60
## 更新升级
61
61
62
- ` yarn global upgrade-interactive --latest ` 然后按空格选中除 pm2 之外的所有包更新,回车确认。
63
- 然后 ` pm2 restart hydrooj ` 重启服务。
64
- 重启后 ` pm2 logs hydrooj --lines 100 ` 没有看到报错并看到了 ` Server started ` 则一切正常。
65
-
66
- Hydro 的所有历史版本,都可以无损升级到最新版本。如果老系统更新有疑问,随时加官方群咨询群主。
62
+ 见 [ 升级指南] ( /FAQ/upgrade.md )
67
63
68
64
## 怎么导入题目/创建题目?
69
65
Original file line number Diff line number Diff line change
1
+ # 升级指南
2
+
3
+ ` yarn global upgrade-interactive --latest ` 然后按空格选中除 pm2 之外的所有包更新,回车确认。
4
+ 然后 ` pm2 restart hydrooj ` 重启服务。
5
+ 重启后 ` pm2 logs hydrooj --lines 100 ` 没有看到报错并看到了 ` Server started ` 则一切正常。
6
+
7
+ Hydro 的所有历史版本,都可以无损升级到最新版本。如果老系统更新有疑问,随时加官方群咨询群主。
8
+
9
+ 以下是升级过程中可能遇到的问题:
10
+
11
+ ## 移除 nvm
12
+
13
+ 在很早的版本中,Hydro 使用 nvm 管理 nodejs 环境,我们已经弃用这种结构,如果你的系统中有 nvm,可以 ` rm -rf ~/.nvm ` 移除;
14
+ 检查是否已经安装 nix 环境,如果没有的话请先使用 ` . <(curl https://hydro.ac/nix.sh) ` 安装 nix。
15
+ 使用 nix 重新安装 nodejs 环境: ` nix-env -iA nixpkgs.nodejs nixpkgs.yarn nixpkgs.pm2 `
16
+
17
+ ## NodeJS >= xx required 报错如何处理?
18
+
19
+ 先看上方 nvm 段落。
20
+
21
+ ``` bash
22
+ nix-channel --update
23
+ nix-env -iA nixpkgs.nodejs nixpkgs.yarn nixpkgs.pm2
24
+ # 继续升级操作
25
+ yarn global upgrade-interactive --latest
26
+ pm2 restart hydrooj --update-env
27
+ ```
28
+
29
+ ## Your sandbox version is tooooooo low!
30
+
31
+ ``` bash
32
+ nix-channel --update
33
+ nix-env -e hydro.sandbox && nix-env -iA nixpkgs.go-judge && ln -sf $( which go-judge) /usr/bin/hydro-sandbox
34
+ pm2 restart hydro-sandbox --update-env
35
+ ```
You can’t perform that action at this time.
0 commit comments