forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
250 lines (184 loc) · 9.25 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
__ __ _ _ _
| \/ | __ _ _ __| | _| | | |___
| |\/| |/ _` | '__| |/ / | | / __|
| | | | (_| | | | <| |_| \__ \
|_| |_|\__,_|_| |_|\_\\___/|___/
Thanks for using MarkUs!
NOTE: These are production install instructions. If you are a MarkUs
developer, please follow setup instructions here:
http://github.com/MarkUsProject/Markus/wiki
ALSO NOTE: You may find the install instructions on our Wiki page easier to
read than this text file. The install instructions on our Wiki
can be found here:
* Development:
https://github.com/MarkUsProject/Markus/wiki/InstallationGnuLinux
https://github.com/MarkUsProject/Markus/wiki/InstallationMacOsX
* Production:
https://github.com/MarkUsProject/Markus/wiki/InstallProdStable
1. WHAT YOU NEED TO KNOW
MarkUs is a Web application using the Ruby on Rails framework. By design, MarkUs
supports one course per installation. I.e. two different courses require two
installed instances of MarkUs. Please keep that in mind for the following
installation process.
2. DOWNLOAD MARKUS
You can download MarkUs from our website
see http://www.markusproject.org/download/
3. INSTALLATION INSTRUCTIONS
3.1 REQUIRED SOFTWARE
As mentioned previously, MarkUs is a Ruby on Rails application. General
requirements are as follows (Note: MarkUs also works using Phusion Passenger):
* Ruby (version 1.8.7 and higher)
* Ruby development package (required for compiling Ruby PostgreSQL drivers)
* net/https Ruby library (libopenssl-ruby Debian package)
* Debian 'build-essential' equivalent packages (gcc, make, libc6-dev, etc.)
These packages are required for building PostgreSQL/MySQL gem packages
* Subversion including Ruby bindings
* Gem (version 1.6.2 and higher)
* The following Ruby gems:
- bundler (1.3.5 and higher)
* Apache httpd (version 2.2 and higher) including the following modules:
- mod_proxy
- mod_rewrite
- mod_dav_svn (required if you want to allow SVN repository access)
- mod_authz_svn (required if you want to allow SVN repository access)
* Ghostscript (known to work with >=9.05, older versions should be ok too)
Only required if you plan to be able to view and annotate pdfs within
the browser (PDF_SUPPORT setting in config files)
* Ant, if you plan to use the MarkUs built in testing framework (still in
development)
DATABASE THINGS
We know that MarkUs works with either PostgreSQL or MySQL databases.
MarkUs/PostgreSQL:
If you plan to use MarkUs with a PostgreSQL database, you need the following
software
* PostgreSQL
* Development package(s) for PostgreSQL
* Ruby gems (Bundler will handle those):
- pg (version 0.15.1 and higher)
MarkUs/MySQL:
If you plan to use MarkUs with a MySQL database, you need the following
software
* MySQL (Bundler will handle those):
* Development package(s) for MySQL
* Ruby gems (Bundler will handle those):
- mysql (version 0.2.18 and higher)
If you are using a Debian based Linux distribution (such as Ubuntu) you could
install the above required software by using commands similar to the
following:
PostgreSQL option:
sudo aptitude install ruby ruby-dev rdoc libopenssl-ruby postgresql \
libpq-dev subversion libsvn-ruby apache2 libapache2-svn
MySQL option:
sudo aptitude install ruby ruby-dev rdoc mysql-server libmysqlclient15-dev \
subversion libsvn-ruby libopenssl-ruby apache2 libapache2-svn
INSTALLING RUBYGEMS
Installing gem (version 1.6.2 and higher) on Debian based systems:
Use rubygems package on your system (for Debian/Ubuntu) :
sudo aptitude install rubygems
or
Download rubygems from rubyforge.org (see
http://rubyforge.org/projects/rubygems/); We show the steps for version
1.3.7 and ruby 1.8.7:
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar -xzf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
sudo mv /usr/bin/gem /usr/bin/gem.old # if you have an older gem version
installed
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
gem -v # for confirmation
Once you've installed rubygems, you'll want to tell Ruby to load rubygems
automatically. This is done by setting the RUBYOPT environment variable
to rubygems. Example (assuming BASH shell):
export RUBYOPT=rubygems
You'll probably want to put this in your .bashrc (or equivalent) as well.
See http://docs.rubygems.org/read/chapter/3 for further details.
3.2 GHOSTSCRIPT (OPTIONAL)
If you plan on using MarkUs' PDF conversion feature so that you can annotate
them using a browser, you need Ghostscript installed.
To make sure you have Ghostscript installed, run:
ghostscript --version
If you don't http://ghostscript.com/doc/9.05/Install.htm#Install_Unix
has detailed instructions on installing Ghostscript.
3.3 INSTALLING MARKUS
Once you have the required software installed, it should be pretty straight-
forward to install MarkUs. We assume you have a database user with appropriate
permissions set up.
* Get a copy of the MarkUs tarball:
wget http://www.markusproject.org/download/markus-latest-stable.tar.gz
* Extract the tarball to the desired location
tar -xzvf markus-latest-stable.tar.gz
* You should have a directory called markus-X.Y.Z now. Change to MarkUs'
application root. For example:
cd markus-1.0-alpha
* Install Rails and required Ruby gems: see section 3.4 "GETTING RAILS
AND RUBYGEMS".
* Set environment variable RAILS_ENV (assumes BASH)
export RAILS_ENV="production"
* Configure database connection settings to match your settings
PostgreSQL option:
cp config/database.yml.postgresql config/database.yml
MySQL option:
cp config/database.yml.mysql config/database.yml
* Configure MarkUs to match your requirements. Please have a look at
config/environments/production.rb. This file is well documented and
your instance specific configuration has to be done in there. Further
information can be found here:
https://github.com/MarkUsProject/Markus/wiki/InstallProdStable
If you have questions, please feel free to get in touch with us:
markus-users@cs.toronto.edu
* Install gems required for MarkUs
bundle install
* Create the database for MarkUs
bundle exec rake db:create
* Load the database schema for MarkUs
bundle exec rake db:schema:load
* Create an instructor (for initial login)
bundle exec rake markus:instructor first_name="test" last_name="test" \
user_name="markus"
* Configure Apache httpd (optional, see example config below)
* Configure Unicorn servers
In the MarkUs root folder run unicorn_rails to start the server with
a default port of 8080. To change port use the flag -l.
* Configure Passenger servers see
http://github.com/MarkUsProject/Markus/wiki/ApachePassenger
* That's it!
If you run into any problems please send e-mail to markus-users@cs.toronto.edu.
We are happy to help and would also like to hear your feedback! Please include
the version number of MarkUs you are using. You can find out about the version
you are currently using by issuing the following command:
bundle exec rake -s markus:version
3.4 GETTING RAILS AND REQUIRED GEMS
Bundler and required ruby gems (including rails) can be installed like
so:
sudo gem install bundler
Make sure "bundle" is in $PATH (assuming BASH). We need to find the
installation location of bundler for this. The following commands may
be helpful:
gem env | grep -A3 'GEM PATHS' # shows path to gems
An example for setting PATH is shown below:
export PATH=$PATH:/usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/bin
Consider adding the above export to your ~/.bashrc.
To get all required gems for MarkUs in one shot (this should take care of
versions too) you'll want to use the bundle install command. However, you'll
probably want to tell bundler to skip over development and test environment
gems, as well as gems for databases that you're not using.
For example, if you were setting up a production version of MarkUs using
a PostgreSQL database backend, you'd want to execute:
bundle install --without development test sqlite mysql
Similarly, if you were setting up a production version of MarkUs using
a MySQL database backend, you'd want to execute:
bundle install --without development test sqlite postgresql
Note that these commands may be executed as a non-root user.
4. FURTHER INSTRUCTIONS, FAQ, LINKS
* http://github.com/MarkUsProject/Markus/wiki/Home
* http://github.com/MarkUsProject/Markus/wiki/InstallProdStable
* http://github.com/MarkUsProject/Markus/wiki/MultipleHosting
* http://www.markusproject.org/dev/markus_httpd_vhost.conf
* See available rake tasks for MarkUs: "bundle exec rake -T markus" or
more generically
"bundle exec rake -T"
5. BUGS
If you think you have found a bug, you can file a bug report or contact
developers at markus-dev@cs.toronto.edu. Feel free to provide a patch ;-)
http://github.com/MarkUsProject/Markus/issues