16
17
# Author: Matt Giuca
19
##########################################################################
20
sudo vim /etc/apt/sources.list
22
# 7.10 (Gutsy) specific #
24
# Gutsy by default had the CD-ROM packages selected, and the Internet packages
25
# commented out. (A comment in the apt sources list said it was because it
26
# failed to verify - IMPORTANT?? Probably not.)
27
# Comment out line 4 (deb cdrom:...)
29
# End 7.10 (Gutsy) specific #
31
# Uncomment ALL the lines for main, restricted and universe
32
# (deb http:...gutsy main restricted, deb-src ... main restricted
33
# deb http:...gutsy universe)
34
# Universe is important for pysvn (python-svn) later on
21
##########################################################################
23
40
sudo apt-get install subversion
24
sudo apt-get install gcc libc6 libc6-dev make debootstrap
25
sudo apt-get install apache2 libapache2-mod-python libapache2-svn
26
sudo apt-get install python2.5-dev python-svn python-webpy
27
sudo apt-get install postgresql python-pygresql python-ldap
28
sudo apt-get install php5 php5-pgsql
29
sudo apt-get install python-cjson
30
sudo apt-get install python-docutils python-epydoc
32
##########################################################################
34
##########################################################################
41
sudo apt-get install gcc libc6 libc6-dev make
43
sudo apt-get install python2.4-dev
45
sudo apt-get install python2.5-dev
47
# Python packages needed by IVLE or student code
48
# See trunk/doc/dependencies.txt
49
wget 'http://pypi.python.org/packages/source/p/python-cjson/python-cjson-1.0.5.tar.gz'
51
tar -zxvf python-cjson-1.0.5.tar.gz
55
sudo ./setup.py install
58
# 6.06 (Dapper) specific
59
wget 'http://webpy.org/static/web.py-0.22.tar.gz'
60
tar -zxvf web.py-0.22.tar.gz
62
python ./setup.py build
63
sudo python ./setup.py install
66
sudo apt-get install python-svn python-webpy python2.4-gtk2 python-matplotlib
67
# End 6.06 (Dapper) specific
69
# 7.10 (Gutsy) specific
70
sudo apt-get install python-svn python-webpy python-numpy python-matplotlib
71
# Note: I had a lot of trouble with the python-svn package.
72
# After playing around a bit it started working.
73
# python -c 'import pysvn'
74
# to test if it worked.
75
# Do Not install python-svn-dbg.
76
# End 7.10 (Gutsy) specific
80
# ===============================
36
82
# Some of these instructions follow
37
83
# https://help.ubuntu.com/community/PostgreSQL
38
84
# 1. install the base packages
86
sudo apt-get install postgresql
87
sudo apt-get install python-pygresql
40
89
# Set the postgres user's postgres password
41
90
sudo -u postgres psql template1
42
91
# At the prompt type (substituting <***password***> with a real one.
43
92
ALTER USER postgres WITH ENCRYPTED PASSWORD '<***password***>';
46
##########################################################################
48
##########################################################################
97
# ===============================
50
98
# Check out the IVLE trunk
52
export IVLE_SVN=ivle_svn
53
svn co https://ivle.svn.sourceforge.net/svnroot/ivle/trunk $IVLE_SVN
99
svn co https://ivle.svn.sourceforge.net/svnroot/ivle/trunk ivle_svn
100
# Says the SourceForge certificate authority is not trusted.
101
# I chose "Accept (p)ermanently" - Problem??
56
103
# Create a postgres database
57
# (only need the first line if it was previously created and is now changed)
58
sudo -u postgres dropdb ivle
104
cd <<ivle source directory>>/userdb
59
105
sudo -u postgres createdb ivle
60
sudo -u postgres psql -d ivle < userdb/users.sql
106
sudo -u postgres psql -d ivle < users.sql
108
# NOTE: From this point onwards it is 7.10 (Gutsy) specific. This is because I
109
# never was able to get IVLE to build with all dependencies on Dapper.
63
113
./setup.py listmake
66
# "Root directory" - type "/" or "/ivle" (without the quotes)
116
# "Root directory" - type "/"
67
117
# "UID of web server process" - 1000 at this stage (informatics)
68
118
# Leave others default.
69
119
# Note: This will cause IVLE to get installed to /opt/ivle
72
122
sudo ./setup.py install
74
# Make the directory containing the svn auth.
75
# Make sure it is owned by www-data.
76
sudo mkdir /opt/ivle/svn
77
sudo chown -R www-data:www-data /opt/ivle/svn
79
# Make the "repositories" and "sessions" directories in the home.
80
# Make sure they are owned by www-data.
82
sudo mkdir repositories sessions
83
sudo chown -R www-data:www-data repositories sessions
86
sudo ./makeuser.py [OPTIONS] <login> 'Firstname Lastname' <rolenm> -p <password>
87
# role = guest/student/tutor/lecturer/admin
89
# Configure the Apache HTTP server
90
sudo cp doc/setup/ivle-both.conf /etc/apache2/sites-available/ivle.conf
125
sudo ./makeuser.py <username>
127
# Set up the Apache HTTP server
128
sudo apt-get install apache2 libapache2-mod-python
130
# DO: Copy the file "ivle.conf" from this package to
131
# /etc/apache2/sites-available.
91
132
# MODIFY the first few lines so it is specific to your server.
92
# * Change ServerAdmin and ServerName (for error reporting).
93
# * Inside the first VirtualHost block, there are two ServerNames
94
# (localhost and public.localhost). You must change these to the domains
95
# for regular IVLE and published-browsing IVLE respectively.
96
# * Inside the second VirtualHost block, there is one ServerName
97
# (svn.localhost). You must change this to the domain for svn access.
98
# * Change all paths beginning with /opt/ivle or /home/informatics to the
99
# locations you have installed things in.
100
vim /etc/apache2/sites-available/ivle.conf
102
134
# Replace the existing config link with the ivle one
103
135
cd /etc/apache2/sites-enabled/
104
136
sudo ln -fs /etc/apache2/sites-available/ivle.conf 000-default
106
# Make sure the 3 domains given in Apache conf all lookup to your server.
107
# (By default these are localhost, public.localhost and svn.localhost).
108
# For testing purposes, this can be done by editing /etc/hosts, for example:
109
127.0.0.1 public.localhost
110
127.0.0.1 svn.localhost
138
# Make the directory corresponding to the directory for saved session
139
# objects in the apache config ivle.conf. Make sure it is owned by www-data,
140
# or at least readable and writable by it.
142
sudo mkdir /home/informatics/sessions
143
sudo chown www-data:www-data /home/informatics/sessions
112
145
# Restart the server
113
146
sudo apache2ctl -k restart
115
##########################################################################
116
# User management server: usrmgt-server
117
##########################################################################
118
# To start the user management server:
120
sudo ./usrmgt-server <port> <usrmgt-password>
121
# usrmgt-password is the password entered in setup.py config (usrmgt_magic)
122
# Note that the port number and usrmgt password are recorded in
123
# the automatically created init.d script: doc/setup/usrmgt-server.init
125
# To run it at boot time:
126
sudo cp doc/setup/usrmgt-server.init /etc/init.d/usrmgt-server
127
sudo chown root:root /etc/init.d/usrmgt-server
128
sudo chmod 700 /etc/init.d/usrmgt-server # so world can't read database magic
129
sudo update-rc.d usrmgt-server defaults 99 # create symlinks in /etc/rc*.d
131
##########################################################################
132
# Setting up phpBB Forum in IVLE
133
##########################################################################
134
# This should all be run from the SVN directory
136
# Create a postgres database
137
# (only need the first line if it was previously created and is now changed)
138
sudo -u postgres dropdb ivle_forum
139
sudo -u postgres createdb ivle_forum
140
sudo -u postgres psql -d ivle_forum < userdb/forum_schema.sql
141
sudo -u postgres psql -d ivle_forum < userdb/forum_data.sql
143
#Change to the installed IVLE directory
145
# Fix permissions for install
147
# At very minimum you apache user must be able to write to
148
# cache/ files/ store/ images/avatars/upload config.php
149
sudo chown -R www-data:www-data .
151
##########################################################################
152
# Installing Pound reverse proxy (optional)
153
##########################################################################
155
151
sudo apt-get install pound
157
153
# edit /etc/default/pound so that the line reading