django-mysql-apache ��ġ (�ۼ��� : 2012.12.21, �ۼ��� : �迵��) 1. python 2.7.3 ��ġ �ٿ�ε� : http://www.python.org/getit/ ��ġ ���� : python-2.7.3.msi python27������ �Ӽ�(����ǻ��) -> ���, ȯ�溯�� -> path�� �߰� 2. DB ��ġ mySQL ��ġ �ٿ�ε� : http://www.mysql.com/downloads/installer/ ��ġ ���� : mysql-installer-community-5.5.28.3.msi root �н����� ���� �� ���� �߰� - root (PW: root) - k09wang (PW: 1231242) Workbench ��ġ MySQLdb(MySQL for Python) ��ġ �ٿ�ε� : http://sourceforge.net/projects/mysql-python/ ��ġ ���� : MySQL-python-1.2.4b4.win32-py2.7.exe database ���� MySQL Command Line Client���� ������ ���� �Է��Ͽ� database�� ���� CREATE DATABASE CHARACTER SET utf8; 3. django 1.4.3 ��ġ �ٿ�ε� : https://www.djangoproject.com/download/ command line���� django ���������� ���丮�� �̵� \>cd C:\Django-1.4.3 c:\Django-1.4.3>python setup.py install Django-1.4.3\django\bin ���丮�� �ִ� django-admin.py�� c:\windows�� ���̽��� ��ġ�� ���丮 ���� �ý��� ��η� ���� �� ������Ʈ�� �����Ϸ��� command line���� ������Ʈ ���� (���ϴ� ���丮 �̵� �� �Ʒ� ��ɾ� �Է�. ������ mysite������ ������.) django-admin.py startproject mysite mysite/ manage.py mysite/ __init__.py settings.py urls.py wsgi.py ���Ͱ��� ��η� �����Ǵµ� manage.py�� settings.py�� ���� ������ �־����. mysite/ __init__.py settings.py urls.py wsgi.py manage.py ���� ���� �����ϵ��� ��. manage.py, settings.py, wsgi.py �� 'mysite.~' �� ���� �Ǿ� �ִ� �κе鿡�� 'mysite.'�� ����. ��) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") -> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") 4. DB ���� settings.py ���� DATABASES �κ��� ������ ���� ����. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': , # Or path to database file if using sqlite3. 'USER': , # Not used with sqlite3. 'PASSWORD': , # Not used with sqlite3. 'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } command line���� mysite ���丮�� �̵� �� python manage.py syncdb �Է��ϸ� DB table���� ������. �׸��� �Ʒ��� ���� ������ �ް� �Ǵµ�, 'yes'�� �Է��ϸ� ������ ���̵� ������ �� ����. You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): 5. south ��ġ �ٿ�ε� : http://www.aeracode.org/releases/south/ ���� ���� : south-0.7.6.tar.gz ����Ǯ�� cmd���� ��ġ��η� �̵� �� python setup.py install ����. settings.py�� INSTALLED_APPS�� 'south' �߰�. 6. apache ��ġ �ٿ�ε� : http://www.apache.org/dist/httpd/binaries/win32/ ��ġ ���� : httpd-2.2.22-win32-x86-no_ssl.msi ��ġ �� ��ȭ�� ���ܿ� ��Ʈ �߰� (TCP 80) 7. apache ���� mod_wsgi ��ġ (apache2-python module) �ٿ�ε� : http://code.google.com/p/modwsgi/downloads/list ��ġ ���� : mod_wsgi-win32-ap22py27-3.3.so mod_wsgi-win32-ap22py27-3.3.so ������ \Apache2.2\modules ���� �ȿ� mod_wsgi.so�� �̸� �����Ͽ� ����. �Ʒ��� �� ������ ������ ���� ����. httpd.conf (~/Apache2.2/conf/httpd.conf) LoadModule wsgi_module modules/mod_wsgi.so �߰� WSGIPythonPath "c:/var/www/mysite" �߰� Options Indexes FollowSymLinks ���� Indexes ���� #Include conf/extra/httpd-vhosts.conf ���� #(�ּ�) ���� httpd-vhosts.conf (~/Apache2.2/conf/extra/httpd-vhosts.conf) ù��° ~ �κ��� ������ ���� ���� DocumentRoot "C:/var/www/mysite" ServerName 09wang.stylefor.us:80 WSGIScriptAlias / "c:/var/www/mysite/wsgi.py" Order deny,allow Allow from all ���� : https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ 8. ���� django project ���� ���� : https://docs.djangoproject.com/en/dev/intro/tutorial01/