~azzar1/unity/add-show-desktop-key

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
251
252
253
254
255
256
257
# Installation Procedure for IVLE
# ===============================

# Target Platform: Ubuntu 7.10
#
# IMPORTANT: This is NOT a shell script. It has interactive sections and
# things that need to be customized.
# It is written like a shell script so it can be mostly cut-and-pasted into
# the shell, but it can't simply be executed.

# While other install guides in this package are generic, this one is very
# specific to our intended configuration. It will be very helpful if trying to
# set up IVLE on Ubuntu 7.06 or higher; less helpful for other platforms.
# This refers to ivle.conf, also included.
#
# Author: Matt Giuca
# Date: 29/1/2008

sudo vim /etc/apt/sources.list

# Gutsy by default had the CD-ROM packages selected, and the Internet packages
# commented out. (A comment in the apt sources list said it was because it
# failed to verify - IMPORTANT?? Probably not.)
# Comment out line 4 (deb cdrom:...)

# Uncomment ALL the lines for main, restricted and universe
# (deb http:...gutsy main restricted, deb-src ... main restricted
# deb http:...gutsy universe)
# Universe is important for pysvn (python-svn) later on
# :wq

##########################################################################
# Apt packages
##########################################################################

sudo apt-get update
sudo apt-get install subversion
sudo apt-get install gcc libc6 libc6-dev make
sudo apt-get install apache2 libapache2-mod-python libapache2-svn
sudo apt-get install python2.5-dev python-svn python-webpy
sudo apt-get install python-numpy python-matplotlib
sudo apt-get install postgresql python-pygresql python-ldap
sudo apt-get install php5 php5-pgsql

# Note: I had a lot of trouble with the python-svn package.
# After playing around a bit it started working.
# python -c 'import pysvn'
# to test if it worked.
# Do Not install python-svn-dbg.

##########################################################################
# Python packages needed by IVLE or student code
##########################################################################
#
# See trunk/doc/dependencies.txt

# CJSON
# Note: apt-get install python-cjson puts it in an unexpected place.
# Setup doesn't handle this correctly, so just install by hand:

wget 'http://pypi.python.org/packages/source/p/python-cjson/python-cjson-1.0.5.tar.gz'
tar -zxvf python-cjson-1.0.5.tar.gz

cd python-cjson-1.0.5
./setup.py build
sudo ./setup.py install
cd ..


# NLTK for student code
wget 'http://prdownloads.sourceforge.net/nltk/nltk-0.9.2.tar.gz'
tar -xzvf nltk-0.9.2.tar.gz
wget 'http://prdownloads.sourceforge.net/nltk/nltk-data-0.9.2.zip'
unzip nltk-data-0.9.2.zip

cd nltk-0.9.2
sudo python setup.py install
cd ..
sudo mkdir /usr/share/nltk
sudo mv data /usr/share/nltk/
sudo chmod -R g+r /usr/share/nltk/data

# Beautiful Soup for student code
# via apt-get
sudo apt-get install python-beautifulsoup
# or
wget 'http://www.crummy.com/software/BeautifulSoup/download/BeautifulSoup.tar.gz'
tar -xzvf BeautifulSoup.tar.gz

cd BeautifulSoup*
sudo python setup.py install
cd ..

# LXML for student code
sudo apt-get install python-lxml

# Python Imaging Library for student code
sudo apt-get install python-imaging

# Elementtree 1.3a for student code
# Needs libtidy for 'TidyHTML' parts
sudo apt-get install libtidy-0.99-0 

svn co http://svn.effbot.org/public/tags/elementtree-1.3a3-20070912/ elementtree1.3
cd elementtree1.3
sudo python setup.py install
cd ..

# SimpleTAL for student code
sudo apt-get install python-simpletal

# SciPy for student code
sudo apt-get install python-scipy

# Documentation packages needed for tutorial system: Docutils, Epydoc
# wget each of these, untar them, and then do: sudo python ./setup.py install

http://docutils.sourceforge.net/docutils-snapshot.tgz
http://downloads.sourceforge.net/epydoc/epydoc-3.0.1.tar.gz?use_mirror=optusnet

# Or using apt-get
# (Note: epydoc doesn't work on Fiesty using apt-get)

sudo apt-get install python-docutils python-epydoc

##########################################################################
# Configure postgres
##########################################################################
#
# Some of these instructions follow
#     https://help.ubuntu.com/community/PostgreSQL
# 1. install the base packages

# Set the postgres user's postgres password
sudo -u postgres psql template1
# At the prompt type (substituting <***password***> with a real one.
ALTER USER postgres WITH ENCRYPTED PASSWORD '<***password***>';
\q

##########################################################################
# Installing ivle
##########################################################################
#
# Check out the IVLE trunk

export IVLE_SVN=ivle_svn
svn co https://ivle.svn.sourceforge.net/svnroot/ivle/trunk $IVLE_SVN
cd $IVLE_SVN

# Create a postgres database
# (only need the first line if it was previously created and is now changed)
sudo -u postgres dropdb ivle
sudo -u postgres createdb ivle
sudo -u postgres psql -d ivle < userdb/users.sql

# Set up IVLE
./setup.py listmake
./setup.py config

# "Root directory" - type "/" or "/ivle" (without the quotes)
# "UID of web server process" - 1000 at this stage (informatics)
# Leave others default.
# Note: This will cause IVLE to get installed to /opt/ivle

./setup.py build
sudo ./setup.py install

# Make the directory containing the svn auth.
# Make sure it is owned by www-data.
sudo mkdir /opt/ivle/svn
sudo chown -R www-data:www-data /opt/ivle/svn

# Make the "repositories" and "sessions" directories in the home.
# Make sure they are owned by www-data.
cd /home/informatics
sudo mkdir repositories sessions
sudo chown -R www-data:www-data repositories sessions

# Create a user
sudo ./makeuser.py [OPTIONS] <login> 'Firstname Lastname' <rolenm> -p <password>
# role = guest/student/tutor/lecturer/admin

# Configure the Apache HTTP server
sudo cp doc/setup/ivle-both.conf /etc/apache2/sites-available/ivle.conf
# MODIFY the first few lines so it is specific to your server.
# * Change ServerAdmin and ServerName (for error reporting).
# * Inside the first VirtualHost block, there are two ServerNames
#   (localhost and public.localhost). You must change these to the domains
#   for regular IVLE and published-browsing IVLE respectively.
# * Inside the second VirtualHost block, there is one ServerName
#   (svn.localhost). You must change this to the domain for svn access.
# * Change all paths beginning with /opt/ivle or /home/informatics to the
#   locations you have installed things in.
vim /etc/apache2/sites-available/ivle.conf

# Replace the existing config link with the ivle one
cd /etc/apache2/sites-enabled/
sudo ln -fs /etc/apache2/sites-available/ivle.conf 000-default

# Make sure the 3 domains given in Apache conf all lookup to your server.
# (By default these are localhost, public.localhost and svn.localhost).
# For testing purposes, this can be done by editing /etc/hosts, for example:
127.0.0.1	public.localhost
127.0.0.1	svn.localhost

# Restart the server
sudo apache2ctl -k restart

##########################################################################
# User management server: usrmgt-server
##########################################################################
# To start the user management server:
cd /opt/ivle/scripts
sudo ./usrmgt-server <port> <usrmgt-password>
# usrmgt-password is the password entered in setup.py config (usrmgt_magic)
# Note that the port number and usrmgt password are recorded in
# the automatically created init.d script: doc/setup/usrmgt-server.init

# To run it at boot time:
sudo cp doc/setup/usrmgt-server.init /etc/init.d
sudo chown root:root /etc/init.d/usrmgt-server
sudo chmod 700 /etc/init.d/usrmgt-server  # so world can't read database magic
sudo update-rc.d usrmgt-server defaults 99  # create symlinks in /etc/rc*.d

##########################################################################
# Setting up phpBB Forum in IVLE
##########################################################################
# This should all be run from the SVN directory

# Create a postgres database
# (only need the first line if it was previously created and is now changed)
sudo -u postgres dropdb ivle_forum
sudo -u postgres createdb ivle_forum
sudo -u postgres psql -d ivle_forum < userdb/forum_schema.sql
sudo -u postgres psql -d ivle_forum < userdb/forum_data.sql

#Change to the installed IVLE directory
cd /opt/ivle
# Fix permissions for install
cd www/php/phpBB3
# At very minimum you apache user must be able to write to
# cache/ files/ store/ images/avatars/upload config.php
sudo chown -R www-data:www-data .

##########################################################################
# Installing Pound reverse proxy (optional)
##########################################################################

sudo apt-get install pound

# edit /etc/default/pound so that the line reading
#     startup=0
# instead reads
#     startup=1
#
# copy pound.cfg to /etc/pound/pound.cfg
# edit IP addresses in pound.cfg