File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ sudo docker --version # 检查 docker 是否正常安装
1919您需要执行下面的指令来开始安装 UOJ:
2020
2121``` bash
22- git clone https://github.com/UniversalOJ/UOJ-System.git
22+ git clone https://github.com/UniversalOJ/UOJ-System.git # 克隆 UOJ-System 仓库
2323cd UOJ-System
24- sudo docker-compose up -d
24+ genRandStr (){ cat /dev/urandom | tr -dc [:alnum:] | head -c $1 ; }
25+ sed -i -e " s/_salt_0_/$( genRandStr 32) /g" -e " s/_salt_1_/$( genRandStr 16) /g" -e " s/_salt_2_/$( genRandStr 16) /g" -e " s/_salt_3_/$( genRandStr 16) /g" docker-compose.yml # 替换配置文件中的 salt
26+ sudo docker-compose up -d # 启动 UOJ
2527```
2628
2729> 如果需要修改端口,请编辑 ` docker-compose.yml ` 文件,修改 ` uoj-web ` 服务的 ` ports ` 项(靠近文件末尾)中的 ` 80:80 ` 为 ` <port>:80 ` 。
@@ -32,4 +34,4 @@ sudo docker-compose up -d
3234
3335UOJ 的数据会存储在 ` uoj_data ` 文件夹下。
3436
35- 下一步,请参阅《[ 维护] ( https://universaloj.github.io /post/维护.html) 》。
37+ 下一步,请参阅《[ 维护] ( /post/维护.html ) 》。
You can’t perform that action at this time.
0 commit comments