...
Code Block |
---|
sudo apt-get install apache2 libapache2-mod-wsgi git-core python-virtualenv postfix
|
Make a virtual python environment.
Code Block |
---|
cd /opt/python_environments/ sudo virtualenv --no-site-packages norduni |
Install needed python modules.
Code Block |
---|
sudo su source python_environments/norduni/bin/activate pip install django httplib2 ipaddr argparse |
Get the NORDUni files:
Code Block |
---|
cd /var/opt/ git clone git://git.nordu.net/norduni.git |
Get the NERDS files:
Code Block |
---|
mkdir /opt/norduni/tools/
cd /opt/norduni/tools/
git clone https://github.com/fredrikt/nerds.git
|
Download neo4j-1.3 from http://neo4j.org.
Extract the file to, for example, /var/opt/norduni/dependencies/.
Code Block |
---|
cd /var/opt/norduni/dependencies/ tar xfz neo4j-1.3.tar.gz |
Symlink admin media and the virtual python environment to niweb.
Code Block |
---|
cd /var/opt/norduni/scr/niweb/
ln -s /var/opt/python_environments/norduni/ env
cd static
ln -s ../env/lib/python2.6/site-packages/django/contrib/admin/media/ admin
|
Change the django settings.
Code Block |
---|
cd /opt/norduni/scr/niweb/
cp generic_settings.py settings.py
vi settings.py
|
Create a file name niweb in /etc/apache2/conf.d/.
Code Block |
---|
WSGIPythonPath "/var/opt/norduni/scr:/var/opt/norduni/scr/niweb"
WSGIPythonHome "/var/opt/norduni/scr/niweb/env"
WSGIRestrictStdin Off
WSGIRestrictStdout Off
WSGIScriptAlias / /var/opt/norduni/scr/sso.wsgi
|
Add the following lines to /etc/apache2/sites-available/default-ssl
Code Block |
---|
<LocationMatch "Shibboleth.sso">
SetHandler None
</LocationMatch>
<Location "/accounts/login-federated/">
AuthType shibboleth
ShibRequireSession On
require valid-user
RequestHeader set X_REMOTE_USER %{eppn}e
RequestHeader set EPPN %{eppn}e
RequestHeader set GIVENNAME %{givenName}e
RequestHeader set SN %{sn}e
RequestHeader set MAIL %{mail}e
RequestHeader set AFFILIATION %{affiliation}e
RequestHeader set ENTITLEMENT %{entitlement}e
</Location>
Alias /admin_media /var/opt/norduni/scr/niweb/static/admin/
Alias /site_media /var/opt/norduni/scr/niweb/static/
<LocationMatch "^/(admin_media|site_media)">
Options FollowSymLinks
Order allow,deny
allow from all
SetHandler None
</LocationMatch>
|
Set up a GIT repository and make a clone in /var/opt/. We have a GIT repository called nistore
and we have made a clone found at /var/opt/nistore/.