이 스냅샷은 2021-07-06 일자 기준 dmoj의 v2.1.1 releases 버전으로 만들어졌습니다.
- dmoj_v2.1.1 스냅샷 선택
- cse-services.flavor 선택
- ssh 7777 포트로 접근
자세한 설치 방법은 https://jcloud-devops.github.io/user-guide.html 참고
가상 환경 저장 공간에 dmoj 구축에 필요한 모든 python 패키지들이 설치되어야 정상이지만, 이 스냅샷은 일부 패키지가 global 환경에 설치되어있습니다. 따라서 아래와 같이 root 권한과 가상 환경이 활성화된 상태에서 명령을 수행해야합니다.
sudo -s
root@jota:/home/jota# . dmojsite/bin/activate
(dmojsite) root@jota:/home/jota#
(dmojsite) root@jota:/home/jota/site/dmoj# vi local_settings.py
ALLOWD_HOST에 본인이 할당받은 외부 IP 입력
.
.
ALLOWED_HOSTS = ['IP address 입력']
.
.
- 서버를 동작하기 전에 필요한 명령 수행
(dmojsite) root@jota:/home/jota/site/dmoj# ./make_style.sh
(dmojsite) root@jota:/home/jota/site/dmoj# python3 manage.py collectstatic
(dmojsite) root@jota:/home/jota/site/dmoj# python3 manage.py compilemessages
(dmojsite) root@jota:/home/jota/site/dmoj# python3 manage.py compilejsi18n
- 서버 start
(dmojsite) root@jota:/home/jota/site/dmoj# python3 manage.py runserver 0.0.0.0:8000
초기 계정
id : admin
passwd : Jotajota!
(dmojsite) root@jota:/home/jota/site/dmoj# python3 manage.py runbridged
judge-server를 시작할 때는 root 권한을 해제하여 가상 환경만 활성화된 상태에서 진행해야합니다.
(dmojsite) ubuntu@jota:/home/jota/site/dmoj# dmoj -c judge.yml localhost
dmoj 사이트의 관리자 페이지 - 제출 - 채점기 에서 jota-judge에 초록불이 들어오면 정상
참고
judge-server 경로 : /usr/lib/python3.8/site-packages/dmoj/
ubuntu@jota:/home/jota/site/dmoj# code-server