Project

General

Profile

Setup And Install » History » Version 2

Version 1 (Luke Murphey, 11/16/2012 08:30 AM) → Version 2/23 (Luke Murphey, 11/17/2012 12:44 AM)

h1. Setup And Install

Below are instructions for how to run your own instance of TextCritical.

h2. Install Prerequisites

To run TextCritical, you will need:

* "Django 1.4.*":https://www.djangoproject.com/download/
* "Python 2.7":http://www.python.org/getit/
* A database (you can use SQLite to avoid setting up a database)

h2. Install TextCritical Application

Check out the source code from http://svn.lukemurphey.net/textcritical.com using a "Subversion client":http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients.

Copy start_here_settings.py to settings.py (under the src directory). Update the settings.py file per your host.

h2. Configure Initialize Database

Specify a database in settings.py unless you intend to use SQLite.

After configuring the database, run syncdb (from the src directory):

<pre>
python manage.py syncdb
</pre>

h2. Import Works

You will need to import the works into the library in order to have something for the site to provide access to. The easy way to do this is to use a prebuilt library. The more difficult way is to import the works yourself.

h3. Using Existing Library

To use an existing library, copy the library.sqlite file to the server. By default, it should be placed in the src directory.

h3. Importing Works

If you want to import works manually, then following the steps below.

First, initialize the library database.

<pre>
python manage.py syncdb --database=library
</pre>

Next, download the relevant works. The Perseus works can be obtained from "Perseus.tufts.edu":http://www.perseus.tufts.edu/hopper/opensource/download. Make sure to get the classics library. Decompress the archive.

Start the import process by running the following command, command substituting "/Users/Luke/Perseus_Directory" with the location where you placed the files:

<pre>
python manage.py batch_import_perseus -d "/Users/Luke/Perseus_Directory"
</pre>

The import process may take a while (it takes about 40 minutes on a Core i7 with 8 GB of RAM).

h2. Start Web Server

For production installs, you ought to use a production web-server like Apache. For development you can use the built in web-server:

<pre>
python manage.py runserver 0.0.0.0:8080
</pre>