Description:
updated install script
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r88:692a33c93a20 - - 1 file changed: 3 inserted, 1 deleted
@@ -1,46 +1,48 | |||||
|
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 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 \ |
|
8 | g++ gcc libmysql-ruby1.8 irb apache2 libmysqlclient15-dev build-essential \ |
|
9 | g++ gcc libmysql-ruby1.8 irb apache2 libmysqlclient15-dev build-essential \ |
|
9 | git-core rubygems rake openssl libopenssl-ruby |
|
10 | git-core rubygems rake openssl libopenssl-ruby |
|
10 |
|
11 | ||
|
11 | echo "Installing rails" |
|
12 | echo "Installing rails" |
|
12 |
|
13 | ||
|
13 | sudo gem install rails --no-ri --no-rdoc |
|
14 | sudo gem install rails --no-ri --no-rdoc |
|
|
15 | + sudo gem install rack -v=1.0.1 --no-ri --no-rdoc | ||
|
14 |
|
16 | ||
|
15 | echo "Fetching Cafe Grader from Git repositories" |
|
17 | echo "Fetching Cafe Grader from Git repositories" |
|
16 |
|
18 | ||
|
17 | echo "Fetching web interface" |
|
19 | echo "Fetching web interface" |
|
18 |
|
20 | ||
|
19 | mkdir cafe_grader |
|
21 | mkdir cafe_grader |
|
20 | cd cafe_grader |
|
22 | cd cafe_grader |
|
21 | git clone http://git.gitorious.org/cafe-grader/cafe-grader-web.git web |
|
23 | git clone http://git.gitorious.org/cafe-grader/cafe-grader-web.git web |
|
22 |
|
24 | ||
|
23 | echo "Configuring rails app" |
|
25 | echo "Configuring rails app" |
|
24 |
|
26 | ||
|
25 | cp web/config/environment.rb.SAMPLE web/config/environment.rb |
|
27 | cp web/config/environment.rb.SAMPLE web/config/environment.rb |
|
26 |
|
28 | ||
|
27 | echo "At this point we will need MySQL user and database." |
|
29 | echo "At this point we will need MySQL user and database." |
|
28 | echo "Have you created MySQL user and database for Cafe grader? (Y/N) " |
|
30 | echo "Have you created MySQL user and database for Cafe grader? (Y/N) " |
|
29 | read ch |
|
31 | read ch |
|
30 |
|
32 | ||
|
31 | if [ "$ch" = "n" -o "$ch" = "N" ] |
|
33 | if [ "$ch" = "n" -o "$ch" = "N" ] |
|
32 | then |
|
34 | then |
|
33 | echo "Please open another terminal and create the user and database for Cafe grader." |
|
35 | echo "Please open another terminal and create the user and database for Cafe grader." |
|
34 |
- echo "Don't forget to grant access to that database f |
|
36 | + echo "Don't forget to grant access to that database for the user." |
|
35 | echo "Please have username, password, and database name ready before continue." |
|
37 | echo "Please have username, password, and database name ready before continue." |
|
36 | echo "Hit enter when ready..." |
|
38 | echo "Hit enter when ready..." |
|
37 | read dummy |
|
39 | read dummy |
|
38 | fi |
|
40 | fi |
|
39 |
|
41 | ||
|
40 | CAFE_PATH=`pwd` |
|
42 | CAFE_PATH=`pwd` |
|
41 |
|
43 | ||
|
42 | cd web |
|
44 | cd web |
|
43 |
|
45 | ||
|
44 | echo "Please provide grader database:" |
|
46 | echo "Please provide grader database:" |
|
45 | read database |
|
47 | read database |
|
46 |
|
48 |
You need to be logged in to leave comments.
Login now