1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
1 |
.. IVLE - Informatics Virtual Learning Environment
|
2 |
Copyright (C) 2007-2009 The University of Melbourne
|
|
3 |
||
4 |
.. This program is free software; you can redistribute it and/or modify
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
6 |
the Free Software Foundation; either version 2 of the License, or
|
|
7 |
(at your option) any later version.
|
|
8 |
||
9 |
.. This program is distributed in the hope that it will be useful,
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
GNU General Public License for more details.
|
|
13 |
||
14 |
.. You should have received a copy of the GNU General Public License
|
|
15 |
along with this program; if not, write to the Free Software
|
|
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17 |
||
18 |
************
|
|
19 |
Installation
|
|
20 |
************
|
|
21 |
||
1164.2.9
by Matt Giuca
doc/man: More headings! |
22 |
System requirements
|
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
23 |
===================
|
24 |
||
1164.2.14
by William Grant
Add dependencies to docs. |
25 |
Given versions are those on which IVLE is known to work; earlier versions |
26 |
might work too. Debian/Ubuntu package names are given after the name of the |
|
27 |
software. |
|
28 |
||
29 |
* Ubuntu 8.04 or later (other distros should work with some tweaking, but are untested)
|
|
30 |
* Apache 2.x with modules:
|
|
31 |
+ mod_python (``libapache2-mod-python``) |
|
32 |
+ mod_dav_svn and mod_authz_svn (``libapache2-svn``) |
|
33 |
* Python 2.5 or 2.6 with modules:
|
|
34 |
+ cjson (``python-cjson``) |
|
35 |
+ ConfigObj (``python-configobj``) |
|
36 |
+ docutils (``python-docutils``) |
|
37 |
+ epydoc (``python-epydoc``) |
|
1164.2.24
by William Grant
Add FormEncode to dependencies, and sort alphabetically. |
38 |
+ FormEncode (``python-formencode``) |
39 |
+ Genshi (``python-genshi``) |
|
40 |
+ psycopg2 (``python-psycopg2``) |
|
41 |
+ pysvn (``python-svn``) |
|
42 |
+ Routes (``python-routes``) |
|
1164.2.14
by William Grant
Add dependencies to docs. |
43 |
+ Storm (``python-storm``) |
44 |
* jQuery (``libjs-jquery``) |
|
45 |
* PostgreSQL 8.3 or later (``postgresql``) |
|
46 |
* Subversion (``subversion``) |
|
47 |
* debootstrap (``debootstrap``) |
|
1164.2.25
by William Grant
Need rsync too. |
48 |
* rsync (``rsync``) |
1164.2.14
by William Grant
Add dependencies to docs. |
49 |
* GCC and related build machinery (``build-essential``) |
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
50 |
|
1164.2.9
by Matt Giuca
doc/man: More headings! |
51 |
Master versus slave servers
|
52 |
===========================
|
|
53 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
54 |
Installing from a Debian package
|
55 |
================================
|
|
56 |
||
57 |
Installing from source
|
|
58 |
======================
|
|
59 |
||
1164.2.15
by William Grant
Add some initial installation docs. |
60 |
While installing from a distribution package is often a better idea for |
61 |
users, developers will need to install from a plain source tree. |
|
62 |
||
63 |
To get the tree, either grab and extract a release tarball, or get the |
|
64 |
very latest code using bzr: ::
|
|
65 |
||
66 |
bzr get lp:ivle
|
|
67 |
||
68 |
You should then change into the new source directory. |
|
69 |
||
70 |
As IVLE needs to compile some binaries, you must first build, then |
|
71 |
install it: ::
|
|
72 |
||
73 |
./setup.py build
|
|
74 |
sudo ./setup.py install
|
|
75 |
||
76 |
Unlike the package, you will have to manually set up the database and |
|
77 |
configuration. |
|
78 |
||
79 |
.. TODO: Separate IVLE PostgreSQL account.
|
|
80 |
||
81 |
First you must create a PostgreSQL database, and populate it with the |
|
82 |
IVLE schema. You may use any name for the database. ::
|
|
83 |
||
84 |
sudo -u postgres createdb ivle
|
|
85 |
sudo -u postgres createlang plpgsql ivle
|
|
86 |
sudo -u postgres psql -d ivle < userdb/users.sql
|
|
87 |
||
88 |
The configuration wizard - ``ivle-config`` - will ask you a series of
|
|
89 |
questions. Apart from database settings, the defaults should be correct |
|
90 |
for a development system. If deploying IVLE properly - particularly on |
|
91 |
multiple nodes - several options will need to be changed. Watching |
|
92 |
carefully, run: ::
|
|
93 |
||
94 |
sudo ivle-config
|
|
95 |
||
96 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
97 |
Basic configuration
|
98 |
===================
|
|
99 |
||
100 |
.. Note: Place here only the configuration required to get the system
|
|
101 |
installed and running. Any further configuration should go in config.rst.
|
|
102 |
||
1164.2.15
by William Grant
Add some initial installation docs. |
103 |
IVLE needs a directory hierarchy in which to store filesystem data, which |
104 |
by default lives in ``/var/lib/ivle``. Create it now. :: |
|
105 |
||
106 |
sudo ivle-createdatadirs
|
|
107 |
||
1164.2.22
by William Grant
Document configuration of the jail creation process. |
108 |
|
109 |
Configuring the jail environment
|
|
110 |
--------------------------------
|
|
1164.2.15
by William Grant
Add some initial installation docs. |
111 |
|
112 |
You will require a self-contained jail environment in which to safely |
|
1164.2.22
by William Grant
Document configuration of the jail creation process. |
113 |
execute student code. |
114 |
Before you can actually build the jail, a few configuration options are |
|
115 |
needed. Open up ``/etc/ivle/ivle.conf``, and find the ``[jail]`` section. |
|
116 |
Add to it: ::
|
|
117 |
||
118 |
devmode = True
|
|
119 |
suite = jaunty # Replace this with the codename of your Ubuntu release.
|
|
120 |
mirror = http://url.to.archive/mirror # Replace with a fast Ubuntu mirror.
|
|
121 |
extra_packages = python-configobj, python-svn, python-cjson
|
|
122 |
||
123 |
Now we can actually build the jail. The creation process basically downloads |
|
124 |
a minimal Ubuntu system and installs it in ``/var/lib/ivle/jails/__base__``.
|
|
125 |
Note that this could download a couple of hundred megabytes. ::
|
|
126 |
||
127 |
sudo ivle-buildjail -r
|
|
1164.2.15
by William Grant
Add some initial installation docs. |
128 |
|
1164.2.16
by William Grant
Add docs on configuring Apache. |
129 |
Configuring Apache
|
130 |
------------------
|
|
131 |
||
132 |
IVLE makes use of two Apache virtual hosts: one for the application itself, |
|
133 |
and one for the Subversion services. There are example configuration files |
|
134 |
in ``examples/config/apache.conf`` and ``examples/config/apache-svn.conf``, |
|
135 |
which will run IVLE at ``http://ivle.localhost/``.
|
|
136 |
||
137 |
On a Debian or Ubuntu system, just copy those two files into |
|
138 |
``/etc/apache2/sites-available`` under appropriate names (eg. ``ivle`` and |
|
139 |
``ivle-svn``). Then you need to activate them: :: |
|
140 |
||
141 |
sudo a2ensite ivle
|
|
142 |
sudo a2ensite ivle-svn
|
|
143 |
sudo /etc/init.d/apache2 reload
|
|
144 |
||
145 |
||
1164.2.17
by William Grant
Add /etc/hosts augmentation docs. |
146 |
Configuring hostname resolution
|
147 |
--------------------------------
|
|
148 |
||
149 |
All of IVLE's hostnames need to be resolvable from the local system. For a |
|
150 |
production environment, this would be done in DNS. For a development system, |
|
1164.2.22
by William Grant
Document configuration of the jail creation process. |
151 |
this is usually done in ``/etc/hosts``. Add this line to that file: :: |
1164.2.17
by William Grant
Add /etc/hosts augmentation docs. |
152 |
|
153 |
127.0.1.1 ivle.localhost public.ivle.localhost svn.ivle.localhost
|
|
154 |
||
1164.2.18
by William Grant
Also edit /etc/hosts inside the jail. |
155 |
Code running inside the jail environment also needs to be able to resolve |
156 |
those names. Add, to ``/var/lib/ivle/jails/__base_build__/etc/hosts``: :: |
|
157 |
||
158 |
127.0.1.1 svn.ivle.localhost
|
|
159 |
||
160 |
Then refresh the active copy of the jail: ::
|
|
161 |
||
162 |
sudo ivle-buildjail
|
|
163 |
||
1164.2.20
by William Grant
Document installation of the usrmgt-server init script. |
164 |
|
165 |
Configuring the user management server
|
|
166 |
--------------------------------------
|
|
167 |
||
168 |
You need to have the IVLE user management server (``usrmgt-server``) running
|
|
169 |
for many parts of IVLE to operate properly, so it should be configured to |
|
170 |
start on boot. There is an example init script in |
|
171 |
``examples/config/usrmgt-server.init``. For Debian or Ubuntu, copy it to
|
|
1164.2.21
by William Grant
Also advise to start usrmgt-server immediately. |
172 |
``/etc/init.d/ivle``. Start it now, and set it to start automatically: :: |
1164.2.20
by William Grant
Document installation of the usrmgt-server init script. |
173 |
|
1164.2.21
by William Grant
Also advise to start usrmgt-server immediately. |
174 |
sudo /etc/init.d/usrmgt-server start
|
1164.2.20
by William Grant
Document installation of the usrmgt-server init script. |
175 |
sudo update-rc.d usrmgt-server defaults 99
|
176 |
||
1164.2.27
by William Grant
Document user creation. |
177 |
|
178 |
Creating the initial user
|
|
179 |
-------------------------
|
|
180 |
||
181 |
.. TODO: Cover making the user an admin, one issue #151 is resolved.
|
|
182 |
||
183 |
The final step in getting a usable IVLE set up is creating a user. ::
|
|
184 |
||
185 |
sudo ivle-makeuser username 'Full Name' -p password
|
|
186 |
||
187 |
You should then be able to browse to ``http://ivle.localhost/``, and
|
|
188 |
log in with that username and password. |
|
189 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
190 |
.. note:: |
191 |
For more advanced configuration, see :ref:`Configuring IVLE |
|
192 |
<ref-configuring-ivle>`. |