Install Notes
UNDER CONSTRUCTION
Introduction
The following provides instructions on how to install and configure the necessary software and source code to establish a development environment for the GCD.
The major steps in this process are:
- Obtaining and installing the necessary third party packages
- Obtaining the GCD Source code and database
- Setting up the database
Most standard Windows desktops should be more than sufficient to establish a development environment:
Minimum Recommendation | Notes | |
---|---|---|
Operating System | Windows XP, Vista, 7 | |
CPU | P4+ | Any reasonably recent desktop should be sufficient |
RAM | 512 MB | |
HD | 500 MB | This is primarily required for the database which is ~400 MB |
Third Party Packages
The following packages need be downloaded and installed:
Package | Location | Minimum Revision | Notes |
---|---|---|---|
Python | www.python.org/download/releases | 2.4.4 |
|
Python Image Library | www.pythonware.com/products/pil/ | 1.1.7 |
|
Django | www.djangoproject.com/download/ | 1.2 |
|
MySQL | dev.mysql.com/downloads/mysql/ | 5.0 |
|
MySQL Python Library | sourceforge.net/projects/mysql-python/ | 1.2.2 |
|
Tortoise SVN | tortoisesvn.net/downloads | 1.5 |
|
GCD Source and Database
The GCD source code is maintained in a subversion repository hosted on Sourceforge here: http://sourceforge.net/projects/grandcomic-book/ and the GCD database dump you will require is located on the GCD servers here: http://dev.comics.org/data
To create your development environment you will need local copies of both the source code and the database, to obtain them follow the following steps:
- Create a directory where you will be working on the GCD Source Code. Eg: C:\GCD
- Use your SVN client to download the latest GCD Source code from: https://grandcomic-book.svn.sourceforge.net/svnroot/grandcomic-book/pydjango
- Using TortoiseSVN, from Windows Explorer, right-click on the GCD directory you have created (C:\GCD) and select SVN Checkout, enter the URL above, choose HEAD revision, select OK.
- Download the latest GCD database from http://dev.comics.org/data, unzip it and store it in your GCD directory and note the name. Typically it’s YYYY-MM-DD.sql
- In your GCD directory you should see a media\img\gcd directory. Within this directory create two sub-directories:
- a new_covers subdirectory (Eg: C:\GCD\media\img\gcd\new_covers)
- a covers_by_id sub-directory (Eg: C:\GCD\media\img\gcd\covers_by_id)
- Settings for the GCD django application are stored in the settings.py file, which you should not modify. To change parameters for your local development environment create a local file in the GCD directory called settings_local.py (Eg: C:\GCD\settings_local.py) and add the following lines, replacing the examples with the appropriate values:
# This is the name of the MySQL database you will create in the next step DATABASE_NAME = 'gcd_dev' # This is the name of the user the GCD application will use to connect to the MySQL database DATABASE_USER = 'gcd_dev' # The following settings are used to set up the connection to the e-mail server # they are necessary to be able to send e-mails which is part of the new user approval process EMAIL_NEW_ACCOUNTS_FROM = '[email protected]' EMAIL_EDITORS = '[email protected]' EMAIL_CONTACT = '[email protected]' EMAIL_HOST = 'smtp.example.com' # Set these parameters as necessary for your e-mail server #(this isn't necessary if your e-mail server doesn't require authentication) EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'password' EMAIL_USE_TLS = False
Database Setup
The following steps are required to setup the GCD database:
- To create the gcd_dev user:
- Open a command shell in your GCD directory
- Run: mysql –u root –pXXXXX where XXXXX is the root password you created during the MySQL installation. Note that there is no space between –p and XXXXX.
- With the mysql shell enter the following commands:
CREATE USER gcd_dev; GRANT ALL ON *.* TO 'gcd_dev'; quit;
- To create the gcd_dev database:
- Open a command shell in your GCD directory
- Run: mysql –u root –pXXXXX where XXXXX is the root password you created during the MySQL installation. Note that there is no space between –p and XXXXX.
- With the mysql shell enter the following commands. Where YYYY-MM-DD.sql is the name of the GCD Database you previously downloaded:
CREATE DATABASE gcd_dev CHARACTER SET utf8; USE gcd_dev; source YYYY-MM-DD.sql;
- To create the rest of the tables needed by the GCD website:
- Open a command shell in your GCD directory
- Run: python manage.py syncdb
- When you are asked about creating an admin user, you can answer "yes" and enter the required info. You can also create the user later if you want.
- Will add in the other steps from Alexandros’ instructions
Starting the GCD Application
Congratulations! You are now ready to run the GCD application.
- To run the GCD application:
- Open a command shell in your GCD directory
- Run: python manage.py runserver
You can connect to the GCD application from any browser by connecting to http://127.0.0.1:8000
Troubleshooting and Other tips
- TBD