Source address: https: //github.com/QingdaoU/OnlineJudge
Refer to the document: https: //github.com/QingdaoU/OnlineJudgeDeploy/tree/2.0
Do not install anything before on my virtual machine, it is to rely on the completion of the following commands to build Qingdao OJ
A mounting environment depends
sudo apt-get update && sudo apt-get install -y vim python-pip curl git sudo apt-get install docker-compose
Second, the use Git clone project and deployed
-b clone Git 2.0 HTTPS: // github.com/QingdaoU/OnlineJudgeDeploy.git && CD OnlineJudgeDeploy the sudo Docker -compose up -d (the root user command), or -E Docker-Compose up the sudo - D (non-root user the command) / * I sudo docker-compose up -d command with the * /
There may be a virtual machine before this command git and not installed, we can install through the following command
APT- sudo GET install git // or sudo apt install git
Third, there is a problem
1、
Error when using the docker "net / http: TLS handshake timeout"
2、
3、
The first problem encountered Ubuntu to modify the contents of the file, but may involve access is not enough problems, this time is generally necessary to modify the contents of the file using the vi command at the command line
vi, wc, gzip, bzip2, tar, yum installation, dpek, user information operation command
4、
错误信息:ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
Solution:
Docker Compose-up -d (root user)
non-root execution will appear this abnormal
non-root should execute this command
sudo -E docker-compose up -d
If you have been prompted to this question can try to restart the virtual machine. . . This is how I tried. . .
5、
错误信息:ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
Solution: Modify the docker-compose.yml the version from 3 to 2
Fourth, log in OJ
User names and passwords are: root and rootroot
The default browser is open: http: //127.0.0.1
Loopback address: 127.0.0.1. Also the address of the machine, the machine is equivalent to localhost or IP. Generally used for testing. For example: ping 127.0.0.1 to test native TCP / IP is normal.
Fifth, in his visit OJ on the virtual machine host
My virtual version is: VMware Workstation 15 Player
A lot of people deal with this problem is to set the Network Editor and Network Adapter
I found a long time it was said Player is no network editor
Who can understand my heart at this time of pain. . . . . . (Omitted here a million words)
I find a few looks can also blog (all solve "the OJ yourself to access this virtual machine on a host of" This problem)
https://blog.csdn.net/qq_17534301/article/details/80925503
https://jingyan.baidu.com/article/46650658e1cc84f549e5f806.html
Check ip addresses on Ubuntu
ifconfig -a
If ifconfig this command is not installed, then something which will prompt you to install, you can install the shining
Explanation:
ens32 represents the first NIC
inet addr IP address of the network card is used to indicate, IP address, this card is 192.168.150.131
For more explanation see the link below
https://blog.csdn.net/dodod2012/article/details/80422729
Overall I still did not solve the problem, and so I address I will update the blog. . .