Description:
changed repo url to use git, thanks to nullzero
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r136:4489f3c36159 - - 1 file changed: 1 inserted, 1 deleted
@@ -1,70 +1,70 | |||||
|
1 | #!/bin/sh |
|
1 | #!/bin/sh |
|
2 |
|
2 | ||
|
3 | echo "This script will install and configure Cafe grader." |
|
3 | echo "This script will install and configure Cafe grader." |
|
4 |
|
4 | ||
|
5 | echo "Installing required apt" |
|
5 | echo "Installing required apt" |
|
6 |
|
6 | ||
|
7 | sudo apt-get update |
|
7 | sudo apt-get update |
|
8 | sudo apt-get install mysql-server mysql-client ruby1.8 ruby1.8-dev rdoc1.8 \ |
|
8 | sudo apt-get install mysql-server mysql-client ruby1.8 ruby1.8-dev rdoc1.8 \ |
|
9 | g++ gcc libmysql-ruby1.8 irb apache2 libmysqlclient15-dev build-essential \ |
|
9 | g++ gcc libmysql-ruby1.8 irb apache2 libmysqlclient15-dev build-essential \ |
|
10 | git-core rubygems rake openssl libopenssl-ruby |
|
10 | git-core rubygems rake openssl libopenssl-ruby |
|
11 |
|
11 | ||
|
12 | echo "Installing rails" |
|
12 | echo "Installing rails" |
|
13 |
|
13 | ||
|
14 | sudo gem install rails --no-ri --no-rdoc --version=2.3.8 |
|
14 | sudo gem install rails --no-ri --no-rdoc --version=2.3.8 |
|
15 |
|
15 | ||
|
16 | echo "Fetching Cafe Grader from Git repositories" |
|
16 | echo "Fetching Cafe Grader from Git repositories" |
|
17 |
|
17 | ||
|
18 | echo "Fetching web interface" |
|
18 | echo "Fetching web interface" |
|
19 |
|
19 | ||
|
20 | mkdir cafe_grader |
|
20 | mkdir cafe_grader |
|
21 | cd cafe_grader |
|
21 | cd cafe_grader |
|
22 |
- git clone -q |
|
22 | + git clone -q git://gitorious.org/cafe-grader/cafe-grader-web.git web |
|
23 |
|
23 | ||
|
24 | echo "Configuring rails app" |
|
24 | echo "Configuring rails app" |
|
25 |
|
25 | ||
|
26 | cp web/config/environment.rb.SAMPLE web/config/environment.rb |
|
26 | cp web/config/environment.rb.SAMPLE web/config/environment.rb |
|
27 |
|
27 | ||
|
28 | echo "At this point we will need MySQL user and database." |
|
28 | echo "At this point we will need MySQL user and database." |
|
29 | echo "Have you created MySQL user and database for Cafe grader? (Y/N) " |
|
29 | echo "Have you created MySQL user and database for Cafe grader? (Y/N) " |
|
30 | read ch |
|
30 | read ch |
|
31 |
|
31 | ||
|
32 | if [ "$ch" = "n" -o "$ch" = "N" ] |
|
32 | if [ "$ch" = "n" -o "$ch" = "N" ] |
|
33 | then |
|
33 | then |
|
34 | echo "Please open another terminal and create the user and database for Cafe grader." |
|
34 | echo "Please open another terminal and create the user and database for Cafe grader." |
|
35 | echo "Don't forget to grant access to that database for the user." |
|
35 | echo "Don't forget to grant access to that database for the user." |
|
36 | echo "Please have username, password, and database name ready before continue." |
|
36 | echo "Please have username, password, and database name ready before continue." |
|
37 | echo |
|
37 | echo |
|
38 | echo "The following are instructions:" |
|
38 | echo "The following are instructions:" |
|
39 | echo "1. Run mysql:" |
|
39 | echo "1. Run mysql:" |
|
40 | echo |
|
40 | echo |
|
41 | echo " mysql -u root -p" |
|
41 | echo " mysql -u root -p" |
|
42 | echo |
|
42 | echo |
|
43 | echo " if you have just installed mysql, the root password is the one that you have just entered" |
|
43 | echo " if you have just installed mysql, the root password is the one that you have just entered" |
|
44 | echo "2. Create a new database, a new user, and grant access to grader database:" |
|
44 | echo "2. Create a new database, a new user, and grant access to grader database:" |
|
45 | echo |
|
45 | echo |
|
46 | echo " create user 'USERNAME'@'localhost' identified by 'PASSWORD';" |
|
46 | echo " create user 'USERNAME'@'localhost' identified by 'PASSWORD';" |
|
47 | echo " create database \`DATABASENEME\`;" |
|
47 | echo " create database \`DATABASENEME\`;" |
|
48 | echo " grant all on \`DATABASENAME\`.* to 'USERNAME'@'localhost';" |
|
48 | echo " grant all on \`DATABASENAME\`.* to 'USERNAME'@'localhost';" |
|
49 | echo |
|
49 | echo |
|
50 | echo " Replace USERNAME, PASSWORD, and DATABASENAME accordingly." |
|
50 | echo " Replace USERNAME, PASSWORD, and DATABASENAME accordingly." |
|
51 | echo |
|
51 | echo |
|
52 | echo "Hit enter when ready..." |
|
52 | echo "Hit enter when ready..." |
|
53 | read dummy |
|
53 | read dummy |
|
54 | fi |
|
54 | fi |
|
55 |
|
55 | ||
|
56 | CAFE_PATH=`pwd` |
|
56 | CAFE_PATH=`pwd` |
|
57 |
|
57 | ||
|
58 | cd web |
|
58 | cd web |
|
59 |
|
59 | ||
|
60 | echo "Please provide grader database:" |
|
60 | echo "Please provide grader database:" |
|
61 | read database |
|
61 | read database |
|
62 |
|
62 | ||
|
63 | echo "Please provide grader username:" |
|
63 | echo "Please provide grader username:" |
|
64 | read username |
|
64 | read username |
|
65 |
|
65 | ||
|
66 | echo "Please provide $username password:" |
|
66 | echo "Please provide $username password:" |
|
67 | read password |
|
67 | read password |
|
68 |
|
68 | ||
|
69 | echo "development:" > config/database.yml |
|
69 | echo "development:" > config/database.yml |
|
70 | echo " adapter: mysql" >> config/database.yml |
|
70 | echo " adapter: mysql" >> config/database.yml |
You need to be logged in to leave comments.
Login now