-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
更新文档以适应 UniversalOJ/UOJ-System#138 中的变化
- Loading branch information
1 parent
3dba068
commit ba2880c
Showing
6 changed files
with
26 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,35 @@ | ||
> 这篇文档将指导您安装UOJ。 | ||
> 这篇文档将指导您安装 UOJ。 | ||
## 安装前的准备 | ||
|
||
您需要准备一台**64位**的Linux系统,这里建议您使用 [Ubuntu](https://www.ubuntu.com/)。 | ||
您需要准备一台 **64位** 的 Linux 系统,这里建议您使用 [Ubuntu](https://www.ubuntu.com/)。 | ||
|
||
然后您需要安装 Docker。它是一个容器技术,暂且可以理解成虚拟机。 | ||
|
||
然后您需要安装`docker`。它是一个容器技术,暂且可以理解成虚拟机。 | ||
```bash | ||
curl -fsSL https://get.docker.com -o get-docker.sh | ||
sudo sh get-docker.sh | ||
|
||
sudo systemctl start docker # 启动 docker 服务 | ||
sudo docker --version # 检查 docker 是否正常安装 | ||
``` | ||
|
||
另外,您可以通过下面的代码安装docker加速器(强烈推荐): | ||
```bash | ||
sudo mkdir -p /etc/docker | ||
sudo tee /etc/docker/daemon.json <<-'EOF' | ||
{ | ||
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] | ||
} | ||
EOF | ||
sudo systemctl daemon-reload | ||
sudo systemctl restart docker | ||
sudo systemctl start docker # 启动 docker 服务 | ||
sudo docker --version # 检查 docker 是否正常安装 | ||
``` | ||
|
||
## 安装 | ||
|
||
您需要执行下面的指令来开始安装 UOJ: | ||
|
||
```bash | ||
sudo docker pull universaloj/uoj-system | ||
sudo docker run --name uoj -dit -p 80:80 --cap-add SYS_PTRACE universaloj/uoj-system | ||
git clone https://github.com/UniversalOJ/UOJ-System.git | ||
cd UOJ-System | ||
sudo docker-compose up -d | ||
``` | ||
|
||
接下来,UOJ将在后台运行。 | ||
> 如果需要修改端口,请编辑 `docker-compose.yml` 文件,修改 `uoj-web` 服务的 `ports` 项(靠近文件末尾)中的 `80:80` 为 `<port>:80`。 | ||
> 上面的代码是用于**新建一个 UOJ 容器**,重启服务器后**不要**使用`docker run`来启动容器。具体参阅维护文档。 | ||
> 如果您不希望用80端口来运行uoj,您可以把上面的`-p 80:80`改成`-p <port>:80`。 | ||
|
||
稍等几分钟,访问服务器的地址,您现在应该能看到UOJ正在运行了。 | ||
接下来,UOJ 将在后台启动。稍等几分钟,访问服务器的地址,您现在应该能看到 UOJ 正在运行了。 | ||
|
||
您注册的第一个用户将被自动设为管理员。 | ||
|
||
UOJ 的数据会存储在 `uoj_data` 文件夹下。 | ||
|
||
下一步,请参阅《[维护](https://universaloj.github.io/post/维护.html)》。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
**这篇文章中的内容可能已经过时,请等待后续文档更新。** | ||
|
||
## Docker简介 | ||
|
||
|