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