# HG changeset patch # User Nattee Niparnan # Date 2022-04-24 15:52:30 # Node ID ccb0988a4eafd182c6e1d319d4a0b23b4c9f867a # Parent 21c0ea2ca2c0e63b8eb0d4ffea3cacb9915aaa88 Update README.rdoc diff --git a/README.rdoc b/README.rdoc --- a/README.rdoc +++ b/README.rdoc @@ -25,7 +25,10 @@ mysql> create database DATABASENAME; Query OK, 1 row affected (0.00 sec) - mysql> grant all privileges on DATABASENAME.* to USERNAME@localhost identified by 'PASSWORD'; + mysql> create user USERNAME@localhost identified by 'PASSWORD'; + Query OK, 0 rows affected, 1 warning (0.00 sec) + + mysql> grant all privileges on DATABASENAME.* to USERNAME@localhost; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> flush privileges; @@ -55,9 +58,14 @@ === 3. Install necessary package and nodejs + First, we install required package via apt. - cafe@grader:~$ sudo apt install libmysqlclient-dev default-jdk unzip php-cli apache2 dirmngr gnupg apache2-dev + cafe@grader:~$ sudo apt install git libmysqlclient-dev default-jdk unzip php-cli apache2 dirmngr gnupg apache2-dev + +Next, we need nodejs. Depends on your ubuntu version, the step to install correct version of nodejs differs. + +==== 3.1 Install nodejs on Ubuntu 18.04 Since nodejs that comes with ubuntu 18.04 is very outdated, we need to install it manually. This follow the method outlined in https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04 under *Installing Node.js with Apt Using a NodeSource PPA* @@ -66,6 +74,9 @@ sudo bash nodesource_setup.sh sudo apt install nodejs +==== 3.2 Install nodejs on Ubuntu 20.04 or newer + + cafe@grader:~$ sudo apt install nodejs === 4. Install cafe-grader @@ -84,11 +95,11 @@ cafe@grader:~$ wget https://github.com/cafe-grader-team/cafe-grader-judge-scripts/raw/master/installer/install.sh cafe@grader:~$ . ./install.sh -After installation is finished, grader is ready to run in development mode via WEBrick. We will try that by the following command which will start a grader accessible via http://localhost:3000/. You can try logging in to the system and verify that it is actually work. +After installation is finished, grader is ready to run in development mode via Puma. We will try that by the following command which will start a grader accessible via http://localhost:3000/. You can try logging in to the system and verify that it is actually work. cafe@grader:~/cafe_grader/web$ rails s -If Everything is OK, stop the WEBrick by Ctrl-C. +If Everything is OK, stop the Puma by Ctrl-C. We are almost done. The last step is to set up apache and Phusion so that cafe-grader is served by apache.