-
Notifications
You must be signed in to change notification settings - Fork 4
Resources
Webfiles:
- /home/minion/snapcode (Git Checkout)
- Main python file for person page: /home/minion/snapcode/django/root/sparqlquery/views.py
- Main template file for person page: /home/minion/snapcode/django/root/sparqlquery/templates/person.html
RDF Files:
- /home/minion/snapdata
Command Line: http://www.pixelbeat.org/cmdline.html
GIT Commands: https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf
When you change a django page you need to run the following command for it to be loaded:
sudo apachectl graceful
- Download and install VirtualBox
- Download VM Iso from https://drive.google.com/file/d/0Bzn6JMdk_8E8ZHU4NmU4X3Racjg/view?usp=sharing (NB. This file is 1.5Gb!)
- Either double-click on the file (VirtualBox should be the default program that it wants to open with) or in VirtualBox go to 'File' menu and select 'import appliance'
- It will do a (long) install, then it will try and run and then it will get upset because some of the settings will be slightly different from the machine that it was created on. Go for the default options it offers you as an alternative and it should work.
- The VM with everything setup should now be running
In the VM
- Default log in details:
username: minion
password: Pwede na?
[THIS DOESN"T WORK ON THE KCL NETWORK]
-
ifconfig
- Get inet address of eth0 - this is the url for the site. Going to this page in your browser should result in a web page
- In a browser go to: http://[what-it-said-the-inet-number-was]/person/[number]
[FOR THE KCL NETWORK]
-
sudo nano /etc/network/interfaces
-
Add the following lines at the bottom of the file:
auto eth1
iface eth1 inet dhap
-
Close and save the file
-
Turn off the VM
-
In VirtualBox open the settings for the VM
-
Under the Network tab:
-
Change Adaptor 1 to NAT
-
Enable the second adaptor and make it Host Only Adaptor
-
Start the VM
-
ifconfig
-
Get inet address of eth1 - this is the url for the site. Going to this page in your browser should result in a web page
- Download and install VirtualBox
- Download (latest) Ubuntu iso and put it somewhere sensible
In VirtualBox:
- Create new virtual machine (select Linux, Ubuntu64 options - then go with all the defaults)
- Run the new VM - you should be prompted to select a drive option. Select the iso (wherever you put it)
- Select the language of your choice and press return
- Select 'Install Ubuntu Server'
- Select language and keyboard as applicable
- Set up account as prompted
- Partition type: full disk
- Do not set up a proxy for network access
- Install OpenSSH and LAMP when given the option
- set MySQL root password (part of LAMP setup)
- complete installation
- Select VM and open settings. In Network tab, change 'Attached to' option to "Bridged Adaptor"
- http://www.virtualbox.org/
- http://www.tuaw.com/2009/09/07/how-to-set-up-ubuntu-linux-on-a-mac-its-easy-and-free/
- http://www.wikihow.com/Install-Ubuntu-on-VirtualBox
- http://navet.ics.hawaii.edu/~casanova/VirtualBoxUbuntuHowTo.html
- http://askubuntu.com/questions/271141/is-django-installed-by-default
In VM:
-
log In
-
sudo apt-get install python-django
-
sudo apt-get install libapache2-mod-wsgi
-
sudo apt-get instal git
-
cd
-
-
sudo nano /etc/apache2/sites-enabled/000-default.conf ** In 000-default.conf add
At the top of the file: WSGIScriptAlias / /home/minion/snapcode/django/root/apache/wsgi.py WSGIPythonPath /home/minion/snapcode/django/root At bottom of virtualHost definition: <Directory /home/minion/snapcode/django/root/apache> <Files wsgi.py> Order allow,deny Require all granted </Files> </Directory>
-
sudo service apache2 restart
-
ifconfig Get inet address of eth0 - this is the url for the site. Going to this page in your browser should result in a web page
-
sudo apt-get install 4store
-
mkdir -m 0777 /var/lib/4store (This is a bit insecure but this is only running in the VM so not a major issue)
-
4s-backend-setup snap
-
mkdir /home/minion/snapdata
-
sudo apt-get install subversion
-
cd /home/minion/snapdata
-
svn checkout https://scm.cch.kcl.ac.uk/svn/snapdrgn/data/RDF (you need a ldap account with the necessary permissions to do this)
-
4s-backend snap
-
4s-import snap -v -M http://pir RDF/pir/PIR*
-
4s-import snap -v -M http://tm RDF/tm/TM*
-
4s-import snap -v -M http://lgpn RDF/lgpn/lgpn*
-
4s-import snap -v -M http://bm RDF/bm/bm*
-
4s-import snap -v -M http://viaf RDF/viaf/viaf*
-
4s-httpd -p 9000 snap
-
sudo nano /etc/default/4store ** In file: set default port to 9000 set default knowledge base to "snap"
- https://docs.djangoproject.com/en/1.7/intro/tutorial01/ (follow the instructions for creating a new project).