forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
216 lines (159 loc) · 7.7 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
__ __ _ _ _
| \/ | __ _ _ __| | _| | | |___
| |\/| |/ _` | '__| |/ / | | / __|
| | | | (_| | | | <| |_| \__ \
|_| |_|\__,_|_| |_|\_\\___/|___/
Thanks for using MarkUs!
NOTE: If you are a MarkUs developer, please follow setup instructions here:
http://github.com/MarkUsProject/Markus/wiki
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)
* RDoc (required for Gem)
* 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.3.7 and higher)
* The following Ruby gems:
- bundler (1.0.3 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)
* ImageMagick (known to work with >=6.5.7, 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)
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):
- ruby-pg (version 0.7.9.2008.01.28 and higher)
- postgres (version 0.7.9.2008.01.28 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 2.8.1 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 gem (version 1.3.7 and higher) on Debian based systems (see
http://github.com/MarkUsProject/Markus/wiki/RailsDebianUpdate)
Download rubygems from rubyforge.org (see
http://rubyforge.org/projects/rubygems/); We show the steps for version
1.3.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
Install MySQL/PostgreSQL Ruby database driver gems:
PostgreSQL option:
sudo gem install ruby-pg postgres
MySQL option:
sudo gem install mysql
3.2 IMAGEMAGICK (OPTIONAL)
If you plan on using MarkUs' PDF conversion feature so that you can annotate
them using a browser, you need ImageMagick installed.
To make sure you have ImageMagick installed, run:
identify --version
If you don't http://www.imagemagick.org/script/install-source.php#unix
has detailed instructions on installing ImageMagick.
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-0.9.0
* 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. If you
have questions, please feel free to get in touch with us:
* Create the database for MarkUs
rake db:create
* Load the database schema for MarkUs
rake db:schema:load
* Create an instructor (for initial login)
rake markus:instructor first_name="test" last_name="test" \
user_name="markus"
* Configure Apache httpd (optional, see example config below)
* Configure Mongrel servers (config/mongrel_cluster.yml)
* Once MarkUs boots up fine (script/server runs without errors), you can start
the mongrel cluster
mongrel_rails cluster::start
see log files (log/mongrel.800x.log) for success/failure messages
* That's it!
If you run into any problems please send e-mail to [email protected].
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:
rake -s markus:version
3.4 GETTING RAILS AND RUBYGEMS
Bundler and required rubygems (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) use the command below. You may choose to do this as non-root
user.
bundle install --without development test
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: "rake -T markus" or more generically
"rake -T"
5. BUGS
If you think you have found a bug, you can file a bug report or contact
developers at [email protected]. Feel free to provide a patch ;-)
http://github.com/MarkUsProject/Markus/issues