tested on lubuntu 13.10 with virtualenv on March 21, 2014
Go to the directory of your choice in a terminal and type:
mkdir europolix
cd europolix
Git is the versionning tool used for the project. The project is currently hosted on github.
sudo apt-get install git
Initialize the git tracking system:
git init
git status
git config --global user.name "[github username]"
git config --global user.email "[email address]"
Indicate where to fetch the source code:
git remote add origin https://github.com/EPX/epx2013.git
Fetch the source code from the github directory and copy it inside the root directory of the project
git pull origin master
If you have right problems:
sudo chown -R [username] ./
MySQL is the database engine used for the project.
sudo apt-get install mysql-server python-setuptools python-dev build-essential libmysqlclient-dev
Copy the sql file of the original database on your local machine (using scp for example).
Create a database called europolix
from the mysql interpreter:
mysql -u root -p
CREATE SCHEMA `europolix` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
exit;
Create the tables from the sql file.
mysql -u root -p europolix < [/path/sql/file]
Inside the europolix directory, update the settings.py file.
At the beginning, modify WEB_ROOT
to point to the address of your server.
In the DATABASES
section, update USER
and PASSWORD
to correspond to your mysql ids.
Virtualenv creates a virtual environment for the project. It allows you to run other projects using the same software but with a different version. For example this project requires python2.7, but you might need python3.0 for another project.
pip install virtualenv
Create a virtual environment for europolix
virtualenv europolix
Activate the environment
source europolix/bin/activate
From now on, all the software will be installed under this virtual session, and available for this project only.
This package let you download other packakes from the internet via a terminal.
sudo apt-get install curl
Python 2.7 is the language used for this project.
curl -O https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
cd ~/Downloads
tar zxf Python-2.7.6.tgz
cd Python-2.7
./configure
If error Python.h not found:
sudo apt-get install python-dev
Then finish the installation of python
sudo make install
PIP is a tool to install python software easily.
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.4.tar.gz
tar xvfz pip-1.4.tar.gz
cd pip-1.4
sudo python setup.py install
The file requirements.txt contains all the dependencies of the project (such as Django, Beautifulsoup). The following line is going to install them all.
pip install -r requirements.txt
python manage.py runserver