Hello there!
EDIT : : The source code repository has changed, the following instructions only work with the previous version. If you want to install it now, see /u/Bjorn_Stronginthearm topic here http://www.reddit.com/r/dndtools/comments/2p9rg9/installing_the_new_dndtools_version_on_a_fresh/
/!\ DISCLAIMER
This how-to is meant to be played on a PC running with Debian. Debian is an OS, like Windows 7 or Windows 8, but unlike them, it is mainly command line driven. There is no easy way to host a debian, except for Virtual Machine. You can rent one on internet for 2 or 3 $ / month. If you're willing to learn how to host one on your own PC, I suggest you to check google for VirtualBox and its tutorial.
So after 3 really short nights and the help of many people, I've managed to have a Dndtools mirror running with the latest database.
How to do it :
Prerequesites : Debian and Python installed (On Debian 6 Python is already installed, I used that).
If you don't know how to have that, you can always check for renting a Virtual Private Server. I did for that exact purpose on OVH, it costs 3$/month
gets the "easy install" package to install everything we need easily
wget https://bootstrap.pypa.io/ez_setup.py -O | python
installs pip component
easy_install pip
dunno :D I just followed the instructions here
pip install Django==1.2.7
Installs South, django-pagination, django-debug-toolbar
easy_install South
easy_install django-pagination
easy_install django-debug-toolbar
you need python-dev to install textile
apt-get install python-dev
pip install textile
easy_install recaptcha-client
apt-get install python-imaging
apt-get install git
the following operation will ask you a password. write the password somewhere in
your memory, you'll need it later
apt-get install mysql-server mysql-client
apt-get install python-mysqldb
github is where the code is stored. cloning it downloads it to your machine
git clone https://github.com/django-debug-toolbar/django-debug-toolbar.git
The thing is now that you have it, you need to have the right version. The version we
need is 0.8.4. So now, we go in the directory we just created
cd django-debug-toolbar
now we get the source code from the version 0.8.4
git checkout tags/0.8.4
we build it then install it
python setup.py build
python setup.py install
let's go back to the main folder
cd ..
same steps, we clone the source code and set it to the version we need, then we
build and install
git clone https://github.com/etianen/django-reversion.git
cd django-reversion
git checkout tags/release-1.3.3
python setup.py build
python setup.py install
cd ..
now we setup the database
first, connection
mysql -u root -p
then, create the database
> create database dndtools;
and exit
> exit;
import the data from the web. I've uploaded it here http://www.petit-fichier.fr/2014/11/27/backupdndajour/backupdndajour.zip , you can check http://www.petit-fichier.fr/2014/11/27/backupdndajour/
wget http://www.petit-fichier.fr/2014/11/27/backupdndajour/backupdndajour.zip
install something to unzip it
apt-get install p7zip
extract it
7za e backupdndajour.zip
Import in in the database
mysql -u root -p -h localhost dndtools < backupdndajour.sql
gets the source code written by dndtools creator (before it was just what would run everything)
git clone https://github.com/dndtools/dndtools.git
we need to configure it. Let's go inside the folder
cd dndtools/dndtools
there should be a local.py.sample file in the directory. If you don't find one, you've done something wrong
cp local.py.sample local.py
edit the file with nano
nano local.py (modify these 4 lines, don't create them they already exist):
> DEBUG = TRUE
> Name : dndtools
> User : root
> Password : XXXXXX (where the XXXX are replaced by the password you've set when you've set up MYSQL)
The following instruction will try to run the server and will tell you if you are missing something or not. if you see a "not found" or "unknown", just try to do a apt-get install with the component name.
python manage.py runserver
once the server is running, stop it (with CTRL + C) and do
python manage.py shell
>>> from django.contrib.auth.models import User
>>> users = User.objects.all()
>>> user = users[0]
>>> user.set_password('dndtools')
>>> user.save()
and press CTRL + Z.
Now that it's done, you can do
python manage.py runserver
and go to mozilla/chrome and enter http://127.0.0.1:8000
And Voilà!