~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
# Installation Procedure for IVLE
# ===============================

# Target Platform: Ubuntu 8.04
#
# 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 8.04 or higher; less helpful for other platforms.
# This refers to ivle.conf, also included.
#
# Author: Matt Giuca
# Date: 29/1/2008

##########################################################################
# Apt packages
##########################################################################
sudo apt-get install rsync subversion build-essential debootstrap       \
                     apache2 libapache2-mod-python libapache2-svn       \
                     python2.5-dev python-svn python-webpy python-cjson \
                     postgresql python-pygresql php5 php5-pgsql         \
                     python-docutils python-epydoc python-ldap

##########################################################################
# Configure postgres
##########################################################################

# Create a new database user which will be used by IVLE to talk to the DB, and
# set this user's password.
# At the prompt type (substituting <***password***> with a real one).
sudo -u postgres psql -c "CREATE USER ivleuser WITH ENCRYPTED PASSWORD '<***password***>'"

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

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 --owner ivleuser ivle
sudo -u postgres createlang plpgsql 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

sudo mkdir -p /home/informatics/{repositories/{users,groups},sessions,logs,jails,jailssrc}
sudo chown -R www-data:www-data /home/informatics/{repositories,sessions,logs}

sudo ./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", "sessions" and "logs" directories in the home.
# Make sure they are owned by www-data.

# 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
# 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.
sudo vim /etc/apache2/sites-available/ivle

# Replace the default with the IVLE site.
sudo a2dissite default
sudo a2ensite ivle

# Restart Apache.
sudo /etc/init.d/apache2 restart

# 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	svn.localhost public.localhost
sudo vim /etc/hosts

##########################################################################
# User management server: usrmgt-server
##########################################################################

sudo cp doc/setup/usrmgt-server.init /etc/init.d/usrmgt-server
sudo chown root:root /etc/init.d/usrmgt-server
sudo chmod +x /etc/init.d/usrmgt-server

# To start it now:
sudo /etc/init.d/usrmgt-server start

# To run it at boot time:
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 --owner ivleuser 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