Work in progress
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 markdown
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
Copy the startup script from /var/opt/norduni/scr/scripts/neo4j/ to /etc/init.d/ and then make neo4j start on boot.
update-rc.d /et/init.d/neo4j defaults
You need to shut down port 7474 from anything except localhost.
iptables -A INPUT -p tcp --dport 7474 -s localhost -j ACCEPT iptables -A INPUT -p tcp --dport 7474 -j DROP
Save the rules and add the following line to your interface configuration so you will restore the rules on a reboot.
bash -c "iptables-save > /etc/iptables.rules" vi /etc/network/interfaces iface eth0 inet static pre-up iptables-restore < /etc/iptables.rules
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 for the JSON files produced by the NERDS producers 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/.
Produce JSON files with the producers you want.
Consume the recently produces JSON files with the NORDUni consume scripts.