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 |
||
1348
by David Coles
Configuration documentation - fixing a few references |
18 |
.. _ref-install: |
19 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
20 |
************
|
21 |
Installation
|
|
22 |
************
|
|
23 |
||
1164.2.9
by Matt Giuca
doc/man: More headings! |
24 |
System requirements
|
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
25 |
===================
|
26 |
||
1164.2.14
by William Grant
Add dependencies to docs. |
27 |
Given versions are those on which IVLE is known to work; earlier versions |
28 |
might work too. Debian/Ubuntu package names are given after the name of the |
|
29 |
software. |
|
30 |
||
1164.2.41
by Matt Giuca
doc/man/install: Added package names for Apache and Python. Added a full apt-get install command to save typing. |
31 |
.. If this list changes, you also need to change the list below.
|
32 |
||
1164.2.14
by William Grant
Add dependencies to docs. |
33 |
* Ubuntu 8.04 or later (other distros should work with some tweaking, but are untested)
|
1164.2.41
by Matt Giuca
doc/man/install: Added package names for Apache and Python. Added a full apt-get install command to save typing. |
34 |
* Apache 2.x (``apache2``) with modules: |
1164.2.14
by William Grant
Add dependencies to docs. |
35 |
+ mod_python (``libapache2-mod-python``) |
36 |
+ mod_dav_svn and mod_authz_svn (``libapache2-svn``) |
|
1164.2.41
by Matt Giuca
doc/man/install: Added package names for Apache and Python. Added a full apt-get install command to save typing. |
37 |
* Python 2.5 (``python2.5``) or 2.6 (``python2.6``) with modules: |
1164.2.14
by William Grant
Add dependencies to docs. |
38 |
+ cjson (``python-cjson``) |
39 |
+ ConfigObj (``python-configobj``) |
|
40 |
+ docutils (``python-docutils``) |
|
41 |
+ epydoc (``python-epydoc``) |
|
1164.2.24
by William Grant
Add FormEncode to dependencies, and sort alphabetically. |
42 |
+ FormEncode (``python-formencode``) |
43 |
+ Genshi (``python-genshi``) |
|
44 |
+ psycopg2 (``python-psycopg2``) |
|
45 |
+ pysvn (``python-svn``) |
|
46 |
+ Routes (``python-routes``) |
|
1164.2.14
by William Grant
Add dependencies to docs. |
47 |
+ Storm (``python-storm``) |
48 |
* jQuery (``libjs-jquery``) |
|
49 |
* PostgreSQL 8.3 or later (``postgresql``) |
|
50 |
* Subversion (``subversion``) |
|
51 |
* debootstrap (``debootstrap``) |
|
1164.2.25
by William Grant
Need rsync too. |
52 |
* rsync (``rsync``) |
1164.2.14
by William Grant
Add dependencies to docs. |
53 |
* 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. |
54 |
|
1164.2.9
by Matt Giuca
doc/man: More headings! |
55 |
Master versus slave servers
|
56 |
===========================
|
|
57 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
58 |
Installing from a Debian package
|
59 |
================================
|
|
60 |
||
61 |
Installing from source
|
|
62 |
======================
|
|
63 |
||
1164.2.41
by Matt Giuca
doc/man/install: Added package names for Apache and Python. Added a full apt-get install command to save typing. |
64 |
.. If this list changes, you also need to change the list above.
|
65 |
||
66 |
If you want to grab all of the required packages in one command, use::
|
|
67 |
||
68 |
sudo apt-get install apache2 libapache2-mod-python libapache2-svn \
|
|
69 |
python2.6 python-cjson python-configobj python-docutils python-epydoc \
|
|
70 |
python-formencode python-genshi python-psycopg2 python-svn python-routes \
|
|
71 |
python-storm libjs-jquery postgresql subversion debootstrap rsync \
|
|
72 |
build-essential
|
|
73 |
||
1164.2.15
by William Grant
Add some initial installation docs. |
74 |
While installing from a distribution package is often a better idea for |
75 |
users, developers will need to install from a plain source tree. |
|
76 |
||
77 |
To get the tree, either grab and extract a release tarball, or get the |
|
78 |
very latest code using bzr: ::
|
|
79 |
||
80 |
bzr get lp:ivle
|
|
81 |
||
82 |
You should then change into the new source directory. |
|
83 |
||
84 |
As IVLE needs to compile some binaries, you must first build, then |
|
85 |
install it: ::
|
|
86 |
||
87 |
./setup.py build
|
|
88 |
sudo ./setup.py install
|
|
89 |
||
90 |
Unlike the package, you will have to manually set up the database and |
|
91 |
configuration. |
|
92 |
||
1164.2.46
by Matt Giuca
doc/man/install: New instructions for setting up Postgres DB and user. Now the database is created under the new username, so there are no problems when IVLE runs as a different database user. |
93 |
First, it is recommended that you create a separate database user for IVLE. |
94 |
You may use any name for the user. ::
|
|
95 |
||
96 |
sudo -u postgres createuser ivleuser # Answer 'n' to all questions
|
|
97 |
sudo -u postgres psql -c "ALTER USER ivleuser WITH ENCRYPTED PASSWORD 'ivle-password';"
|
|
98 |
||
99 |
Now, you must create a PostgreSQL database, and populate it with the |
|
100 |
IVLE schema. You may use any name for the database (here we use ``ivle``). :: |
|
101 |
||
102 |
sudo -u postgres createdb -O ivleuser ivle
|
|
1164.2.15
by William Grant
Add some initial installation docs. |
103 |
sudo -u postgres createlang plpgsql ivle
|
1164.2.46
by Matt Giuca
doc/man/install: New instructions for setting up Postgres DB and user. Now the database is created under the new username, so there are no problems when IVLE runs as a different database user. |
104 |
psql -h localhost -W ivle ivleuser < userdb/users.sql
|
1164.2.15
by William Grant
Add some initial installation docs. |
105 |
|
106 |
The configuration wizard - ``ivle-config`` - will ask you a series of
|
|
1164.2.46
by Matt Giuca
doc/man/install: New instructions for setting up Postgres DB and user. Now the database is created under the new username, so there are no problems when IVLE runs as a different database user. |
107 |
questions. You should give the database username and password as configured |
108 |
above. Apart from database settings, the defaults should be correct |
|
1164.2.15
by William Grant
Add some initial installation docs. |
109 |
for a development system. If deploying IVLE properly - particularly on |
110 |
multiple nodes - several options will need to be changed. Watching |
|
111 |
carefully, run: ::
|
|
112 |
||
113 |
sudo ivle-config
|
|
114 |
||
115 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
116 |
Basic configuration
|
117 |
===================
|
|
118 |
||
119 |
.. Note: Place here only the configuration required to get the system
|
|
120 |
installed and running. Any further configuration should go in config.rst.
|
|
121 |
||
1164.2.15
by William Grant
Add some initial installation docs. |
122 |
IVLE needs a directory hierarchy in which to store filesystem data, which |
123 |
by default lives in ``/var/lib/ivle``. Create it now. :: |
|
124 |
||
125 |
sudo ivle-createdatadirs
|
|
126 |
||
1164.2.22
by William Grant
Document configuration of the jail creation process. |
127 |
|
128 |
Configuring the jail environment
|
|
129 |
--------------------------------
|
|
1164.2.15
by William Grant
Add some initial installation docs. |
130 |
|
131 |
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. |
132 |
execute student code. |
133 |
Before you can actually build the jail, a few configuration options are |
|
1164.2.42
by Matt Giuca
doc/man/install: Minor confusion avoidance. |
134 |
needed. Open up ``/etc/ivle/ivle.conf``, and find the ``[jail]`` section |
135 |
(**not** the ``[[jails]]`` section). |
|
1164.2.22
by William Grant
Document configuration of the jail creation process. |
136 |
Add to it: ::
|
137 |
||
138 |
devmode = True
|
|
139 |
suite = jaunty # Replace this with the codename of your Ubuntu release.
|
|
140 |
mirror = http://url.to.archive/mirror # Replace with a fast Ubuntu mirror.
|
|
141 |
extra_packages = python-configobj, python-svn, python-cjson
|
|
142 |
||
1164.2.28
by William Grant
Add a TODO about jailbuilding instructions for the packages. |
143 |
.. TODO: Move this around a bit, as the config options required differ for
|
144 |
the packaged version.
|
|
145 |
||
1164.2.22
by William Grant
Document configuration of the jail creation process. |
146 |
Now we can actually build the jail. The creation process basically downloads |
147 |
a minimal Ubuntu system and installs it in ``/var/lib/ivle/jails/__base__``.
|
|
148 |
Note that this could download a couple of hundred megabytes. ::
|
|
149 |
||
150 |
sudo ivle-buildjail -r
|
|
1164.2.15
by William Grant
Add some initial installation docs. |
151 |
|
1164.2.16
by William Grant
Add docs on configuring Apache. |
152 |
Configuring Apache
|
153 |
------------------
|
|
154 |
||
155 |
IVLE makes use of two Apache virtual hosts: one for the application itself, |
|
156 |
and one for the Subversion services. There are example configuration files |
|
157 |
in ``examples/config/apache.conf`` and ``examples/config/apache-svn.conf``, |
|
158 |
which will run IVLE at ``http://ivle.localhost/``.
|
|
159 |
||
160 |
On a Debian or Ubuntu system, just copy those two files into |
|
161 |
``/etc/apache2/sites-available`` under appropriate names (eg. ``ivle`` and |
|
162 |
``ivle-svn``). Then you need to activate them: :: |
|
163 |
||
164 |
sudo a2ensite ivle
|
|
165 |
sudo a2ensite ivle-svn
|
|
166 |
sudo /etc/init.d/apache2 reload
|
|
167 |
||
168 |
||
1164.2.17
by William Grant
Add /etc/hosts augmentation docs. |
169 |
Configuring hostname resolution
|
170 |
--------------------------------
|
|
171 |
||
172 |
All of IVLE's hostnames need to be resolvable from the local system. For a |
|
173 |
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. |
174 |
this is usually done in ``/etc/hosts``. Add this line to that file: :: |
1164.2.17
by William Grant
Add /etc/hosts augmentation docs. |
175 |
|
176 |
127.0.1.1 ivle.localhost public.ivle.localhost svn.ivle.localhost
|
|
177 |
||
1164.2.18
by William Grant
Also edit /etc/hosts inside the jail. |
178 |
Code running inside the jail environment also needs to be able to resolve |
179 |
those names. Add, to ``/var/lib/ivle/jails/__base_build__/etc/hosts``: :: |
|
180 |
||
181 |
127.0.1.1 svn.ivle.localhost
|
|
182 |
||
183 |
Then refresh the active copy of the jail: ::
|
|
184 |
||
185 |
sudo ivle-buildjail
|
|
186 |
||
1164.2.20
by William Grant
Document installation of the usrmgt-server init script. |
187 |
|
188 |
Configuring the user management server
|
|
189 |
--------------------------------------
|
|
190 |
||
191 |
You need to have the IVLE user management server (``usrmgt-server``) running
|
|
192 |
for many parts of IVLE to operate properly, so it should be configured to |
|
193 |
start on boot. There is an example init script in |
|
194 |
``examples/config/usrmgt-server.init``. For Debian or Ubuntu, copy it to
|
|
1164.2.44
by Matt Giuca
doc/man/install: Conflicting advice for installing usrmgt-server init script. Now recommend installation to /etc/init.d/ivle-usrmgt-server. |
195 |
``/etc/init.d/ivle-usrmgt-server``. Start it now, and set it to start
|
196 |
automatically: ::
|
|
1164.2.20
by William Grant
Document installation of the usrmgt-server init script. |
197 |
|
1164.2.44
by Matt Giuca
doc/man/install: Conflicting advice for installing usrmgt-server init script. Now recommend installation to /etc/init.d/ivle-usrmgt-server. |
198 |
sudo /etc/init.d/ivle-usrmgt-server start
|
199 |
sudo update-rc.d ivle-usrmgt-server defaults 99
|
|
1164.2.20
by William Grant
Document installation of the usrmgt-server init script. |
200 |
|
1164.2.27
by William Grant
Document user creation. |
201 |
|
202 |
Creating the initial user
|
|
203 |
-------------------------
|
|
204 |
||
1164.2.30
by William Grant
Document creating an admin user, now issue #151 is fixed. |
205 |
The final step in getting a usable IVLE set up is creating a user. You'll |
206 |
probably want admin privileges - if not, drop the ``--admin``. :: |
|
207 |
||
1164.2.45
by Matt Giuca
doc/man/install: s/ivle-makeuser/ivle-adduser/g. |
208 |
sudo ivle-adduser --admin -p password username 'Full Name'
|
1164.2.27
by William Grant
Document user creation. |
209 |
|
210 |
You should then be able to browse to ``http://ivle.localhost/``, and
|
|
211 |
log in with that username and password. |
|
212 |
||
1164.2.7
by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst. |
213 |
.. note:: |
214 |
For more advanced configuration, see :ref:`Configuring IVLE |
|
215 |
<ref-configuring-ivle>`. |