---
# System prepended metadata

title: ZeroJudge

---

ZeroJudge
===
ZeroJudge安裝
---
[ZeroJudge下載](https://drive.google.com/file/d/1Y-PW031lYHOuxqQUe3rjL2B8ePEGyRuC/view)
- [x] 確定linux網路連線
### 允許指定網域的主機連線到Linux
```bash!
sudo nano /etc/hosts.allow
```
```bash=
# /etc/hosts.allow: list of hosts that are allowed to access the system.
#                   See the manual pages hosts_access(5) and hosts_options(5).
#
# Example:    ALL: LOCAL @some_netgroup
#             ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "rpcbind" for the
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
#
sshd: 127.0.0.1
#這裡新增自己網域的IP
sshd: 192.168.0.0/24
```
- [ ] 確定SSH可以連線
### 自動更新ZeroJudge
```bash!
sudo python3 /home/zero/ZeroJudge/setup.py install --dbpass '!@34ZeroJudge'
```
### 更新apt、重新安裝tomcat8
```bash!
sudo apt update
```
```bash!
sudo apt install tomcat8
```
Tomcat設定
---
### 進入Tomcat設定檔
```bash!
cd /etc/tomcat8
sudo nano server.xml
```
### 69行改成需要的port
![image](https://hackmd.io/_uploads/BJhpi8gwC.png)
### 重新啟動Tomcat
```bash!
sudo systemctl restart tomcat8
```
### 確定在Windows用指定的Port可以連線到Zerojudge
![image](https://hackmd.io/_uploads/rkGMmwlwA.png)

裁判機設定
---
### 回到VMware Workstation下的linux
### 用firefox打開127.0.0.1:8081
![image](https://hackmd.io/_uploads/SJ_4EPlDR.png)
### 帳號:zero
### 密碼:!@#$zerojudge
![image](https://hackmd.io/_uploads/SJYrNvxvC.png)
### 管理系統參數
![image](https://hackmd.io/_uploads/HyWj4wxDC.png)
### 修改本站的開放位置、允許管理員登入的子網段為0.0.0.0/0後儲存
![image](https://hackmd.io/_uploads/H1cbrPgvA.png)
### 修改裁判機URL為http://127.0.0.1:8081/ZeroJudge_Server後儲存
![image](https://hackmd.io/_uploads/SJr3Hvxw0.png)