You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This guide is written for Ubuntu 10.04.

sudo apt-get install apache2 libapache2-mod-wsgi git-core python-virtualenv postfix openjdk-6-jre-headless

Make a virtual python environment.

cd /opt/python_environments/
sudo virtualenv --no-site-packages norduni

Install needed python modules.

sudo su
source python_environments/norduni/bin/activate
pip install django httplib2 ipaddr argparse pexpect

Get the NORDUni files:

cd /var/opt/
git clone git://git.nordu.net/norduni.git

Get the NERDS files:

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/.

cd /var/opt/norduni/dependencies/
tar xfz neo4j-1.3.tar.gz

Symlink admin media and the virtual python environment to niweb.

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.

cd /opt/norduni/scr/niweb/
cp generic_settings.py settings.py
vi settings.py

Create a file name niweb in /etc/apache2/conf.d/.

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

        <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/.

  • No labels