Setup And Install » History » Version 2
« Previous -
Version 2/23
(diff) -
Next » -
Current version
Luke Murphey, 11/17/2012 12:44 AM
Setup And Install¶
Below are instructions for how to run your own instance of TextCritical.
Install Prerequisites¶
To run TextCritical, you will need:
- Django 1.4.*
- Python 2.7
- A database (you can use SQLite to avoid setting up a database)
Install TextCritical Application¶
Check out the source code from http://svn.lukemurphey.net/textcritical.com using a Subversion client.
Copy start_here_settings.py to settings.py (under the src directory). Update the settings.py file per your host.
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):
python manage.py syncdb
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.
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.
Importing Works¶
If you want to import works manually, then following the steps below.
First, initialize the library database.
python manage.py syncdb --database=library
Next, download the relevant works. The Perseus works can be obtained from Perseus.tufts.edu. Make sure to get the classics library. Decompress the archive.
Start the import process by running the following command, substituting "/Users/Luke/Perseus_Directory" with the location where you placed the files:
python manage.py batch_import_perseus -d "/Users/Luke/Perseus_Directory"
The import process may take a while (it takes about 40 minutes on a Core i7 with 8 GB of RAM).
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:
python manage.py runserver 0.0.0.0:8080