--- title: Judgehost tags: article, domjudge --- # Judgehost Installation ### Install Compliers (for judgement) ``` sudo apt-get install debootstrap libcgroup-dev lsof procps gcc g++ \ openjdk-8-jre-headless openjdk-8-jdk ghc fp-compiler libjsoncpp-dev sudo apt-get install libcurl3 -y sudo apt-get install libcurl4 libcurl4-openssl-dev -y ``` ### Install Judgehost 於 **domjudge** 目錄下進行安裝 (請替換路徑成實際安裝路徑) ``` cd ~/domjudge ./configure --prefix=$HOME/domjudge make judgehost sudo make install-judgehost ``` ### Sudo permissions ``` cd judgehost/etc sudo useradd -d /nonexistent -U -M -s /bin/false domjudge-run sudo cp sudoers-domjudge /etc/sudoers.d ``` ### Chroot Environment (於 **judgehost** 目錄下執行) ``` cd ~/domjudge/judgehost sudo bin/dj_make_chroot ``` ### Linux Control Groups (於 **judgehost** 目錄下執行) ``` cd ~/domjudge/judgehost sudo vim /etc/default/grub ``` > 替換 `GRUB_CMDLINE_LINUX_DEFAULT`的值為`"quiet cgroup_enable=memory swapaccount=1"`  ``` sudo update-grub reboot ``` - 啟用cgroups ``` sudo ./bin/create_cgroups ``` - 啟用judgedaemon (should not be run as root) ``` ./bin/judgedaemon ``` > **Problem :** Call to undefined function curl_init() > **Solution :** > $ sudo apt-get > $ sudo vim /etc/php/7.2/apache2/php.ini > delete `;` of `;extension=intl` in `php.ini` (at ln. 895) > $ sudo systemctl restart apache2 --- 如果成功的話,應該會跳出這個畫面:  可以用以下的步驟登入測試用參賽者帳號(dummy)並上傳測試: ### Resetting password (於 **domjudge** 目錄下執行) ``` webapp/bin/console domjudge:reset-user-password dummy ``` 首次安裝後,可以使用這些使用者帳號 (替換掉dummy): > (管理者) admin > (評測者) judgehost > (測試參賽者) dummy
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up