Install Notes: Difference between revisions
No edit summary |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 34: | Line 34: | ||
|- | |- | ||
| '''HD''' | | '''HD''' | ||
| | | 1 GB | ||
| This is primarily required for the database which is ~ | | This is primarily required for the database which is ~700 MB | ||
|} | |} | ||
Line 61: | Line 61: | ||
| Python Image Library | | Python Image Library | ||
| [http://www.pythonware.com/products/pil/ www.pythonware.com/products/pil/] | | [http://www.pythonware.com/products/pil/ www.pythonware.com/products/pil/] | ||
| 1.1 | | 1.1.7 | ||
| | | | ||
* Ensure you download the correct library for your installed version of Python | * Ensure you download the correct library for your installed version of Python | ||
Line 68: | Line 68: | ||
| Django | | Django | ||
| [http://www.djangoproject.com/download/ www.djangoproject.com/download/] | | [http://www.djangoproject.com/download/ www.djangoproject.com/download/] | ||
| 1. | | 1.2 | ||
| | | | ||
* Using the latest official Django release should be ok | * Using the latest official Django release should be ok | ||
Line 92: | Line 92: | ||
* Ensure you download the correct library for your installed version of Python (2.x) | * Ensure you download the correct library for your installed version of Python (2.x) | ||
* Pre-compiled windows installers can be found in the [http://sourceforge.net/projects/mysql-python/forums/forum/70460 MySQL for Python Forums] | * Pre-compiled windows installers can be found in the [http://sourceforge.net/projects/mysql-python/forums/forum/70460 MySQL for Python Forums] | ||
|- | |||
| PyICU | |||
| [http://pyicu.osafoundation.org/ pyicu.osafoundation.org/] | |||
| 1.0 | |||
| | |||
* python extension wrapping IBM's ICU C++ API, therefore depends on [http://site.icu-project.org/ IBM's ICU] (version 4.2 and 4.4 are known to work) | |||
* Usually can be installed with 'easy_install pyicu'. | |||
|- | |||
| csstidy | |||
| [http://csstidy.sourceforge.net/ csstidy.sourceforge.net/] | |||
| 1.3 | |||
| | |||
* opensource CSS parser and optimiser | |||
* usually can be installed as package, or download from its website | |||
|- | |||
| BeautifulSoup | |||
| [http://www.crummy.com/software/BeautifulSoup/ www.crummy.com/software/BeautifulSoup/] | |||
| 3.1 | |||
| | |||
* Python HTML/XML parser | |||
* Usually can be installed with 'easy_install BeautifulSoup' | |||
|- | |||
| Django compressor | |||
| [http://github.com/mintchaos/django_compressor github.com/mintchaos/django_compressor] | |||
| 0.5.3 | |||
| | |||
* Compresses linked and inline javascript or CSS into a single cached file. | |||
* Usually can be installed with 'easy_install django_compressor' | |||
|- | |- | ||
Line 101: | Line 134: | ||
|} | |} | ||
= GCD Source and Database = | = GCD Source and Database = | ||
The GCD source code is maintained in a subversion repository hosted on Sourceforge here: [http://sourceforge.net/projects/grandcomic-book/ http://sourceforge.net/projects/grandcomic-book/] and the GCD database dump you will require is located on the GCD servers here: [http:// | The GCD source code is maintained in a subversion repository hosted on Sourceforge here: [http://sourceforge.net/projects/grandcomic-book/ http://sourceforge.net/projects/grandcomic-book/] and the GCD database dump you will require is located on the GCD servers here: [http://www.comics.org/download/ http://www.comics.org/download/] | ||
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: | 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: | ||
Line 126: | Line 158: | ||
# The following settings are used to set up the connection to the e-mail server | # 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 | # they are necessary to be able to send e-mails which is part of the new user approval process | ||
EMAIL_NEW_ACCOUNTS_FROM = ' | EMAIL_NEW_ACCOUNTS_FROM = 'user@example.com' | ||
EMAIL_EDITORS = ' | EMAIL_EDITORS = 'user@example.com' | ||
EMAIL_CONTACT = ' | EMAIL_CONTACT = 'user@example.com' | ||
EMAIL_HOST = 'smtp.example.com' | EMAIL_HOST = 'smtp.example.com' | ||
# Set these parameters as necessary for your e-mail server | # Set these parameters as necessary for your e-mail server | ||
EMAIL_HOST_USER = ' | #(this isn't necessary if your e-mail server doesn't require authentication) | ||
EMAIL_HOST_USER = 'user@example.com' | |||
EMAIL_HOST_PASSWORD = 'password' | EMAIL_HOST_PASSWORD = 'password' | ||
EMAIL_USE_TLS = False | EMAIL_USE_TLS = False | ||
Line 182: | Line 215: | ||
= Troubleshooting and Other tips = | = Troubleshooting and Other tips = | ||
* ''TBD'' | * ''TBD'' | ||
[[Category: GCD Technical]] |
Latest revision as of 21:19, 2 January 2012
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 | 1 GB | This is primarily required for the database which is ~700 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 |
|
PyICU | pyicu.osafoundation.org/ | 1.0 |
|
csstidy | csstidy.sourceforge.net/ | 1.3 |
|
BeautifulSoup | www.crummy.com/software/BeautifulSoup/ | 3.1 |
|
Django compressor | github.com/mintchaos/django_compressor | 0.5.3 |
|
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://www.comics.org/download/
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