Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 13 and Version 14 of DataBaseInstalation


Ignore:
Timestamp:
06/24/07 18:07:50 (12 years ago)
Author:
Chris Arndt
Comment:

migration notice

Legend:

Unmodified
Added
Removed
Modified
  • DataBaseInstalation

    v13 v14  
    1 This page is intended to be used by either SQLObject or SQLAlchemy and even though it's not directly TG related it's a must. 
    2  
    3 NOTE: please note that even though SQLALchemy support is now primitive it's the way to go in the future. 
    4  
    5 For now it's just a bunch of links because I intend it to be created by everyone 
    6  
    7 [http://www.sqlobject.org/SQLObject.html#dbconnection-database-connections SQLObject Supported Backends] 
    8  * MySQL 
    9  * Postgres 
    10  * SQLite 
    11  * Firebird 
    12  * Sybase 
    13  * MAX DB  
    14  * MS SQL Server 
    15  
    16  
    17  
    18 [http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/lib/sqlalchemy/databases SQLAlchemy Supported Backends] 
    19  * Firebird 
    20  * MS SQL Server 
    21  * MySQL 
    22  * Oracle 
    23  * Postgres 
    24  * SQLite 
    25  
    26 First we'll assume you already have a database backend installed and working, since if you want an ORM you are probably sick of SQL and therefore have a funtional database :) 
    27  
    28 The process of installing a db is very diferent for each one so please [http://www.google.com google] it. 
    29  
    30 pause while you install the db engine 
    31  
    32 So now that we have a working db we need some python bindings for it, that is a library that lets python programs interact with the db backend. 
    33  
    34 = Linux = 
    35 There many ways to install  
    36  * look to see if the package is in your package manager. 
    37  * if not then make a package for it. 
    38  * look to see if it is available from http://www.python.org/pypi and easy_install it. 
    39  * build from source. 
    40  
    41 Which way to go depends on you, although most distros prefer to manage all install, easy_install is probably the easiest way. 
    42  
    43 == MySql == 
    44 You will need [http://sourceforge.net/projects/mysql-python mysqldb] it may be called mysql-python on your package manager and it is called that in pypi. 
    45  
    46 === Best Approach === 
    47 - Use your package manager 
    48  
    49 if that fails 
    50  * Install development tools (gcc,make,etc.) 
    51  * Install mysql developement tools 
    521{{{ 
    53 easy_install mysql-python 
     2#!rst 
     3.. note:: This page has been migrated to http://docs.turbogears.org/1.0/DataBaseInstallation. 
    544}}} 
    55  
    56 == SQLite == 
    57 You will need [http://initd.org/tracker/pysqlite pysqlite] 
    58  
    59 === Best Approach === 
    60 - Use your package manager 
    61  
    62 As easy as the above  
    63 {{{ 
    64 easy_install pysqlite 
    65 }}} 
    66 == PostgreSql == 
    67 You will need [http://initd.org/tracker/psycopg/wiki/PsycopgTwo psycopg2] if you're going to use Unicode, otherwise either psycopg or psycopg2 will do it.  We recommend using psycopg2 because of other features besides unicode. 
    68  
    69 === Best Approach === 
    70 - Use your package manager 
    71  
    72 - Look for binaries at [http://initd.org/tracker/psycopg/wiki/PsycopgTwoInstall the install page] 
    73  
    74 - Build it yourself using [http://initd.org/tracker/psycopg/wiki/PsycopgTwoInstall these] instructions. 
    75  
    76 = Windows = 
    77 In Windows there is basically one way to install packages, an exe file (aka installer), provided by the package author or users. Installing from source is a pain and should be your last resource. If you do choose to go this way you will need VisualStudio or the equivalent TODO add link to MC visual C compiler, '''NOTE''' it's not an easy task. 
    78  
    79 == MySql == 
    80 You will need [http://sourceforge.net/projects/mysql-python mysqldb], mysql-python is the name in in pypi. 
    81  
    82 I finally made an installer, I forgot to post it here you can find it at [http://sourceforge.net/project/showfiles.php?group_id=22307 download Links] 
    83  
    84 === Best Approach === 
    85 [http://sourceforge.net/project/showfiles.php?group_id=22307 mysql-python Downloads] and get the lastest exe/zip (1.2.1_p2). if this gets outdated please use this one until I or someone else provides a new binary. 
    86  
    87 if that fails 
    88  * TODO if I ever get this (got a week trying to compile it, post it here) 
    89  
    90 == SqlLite == 
    91 You will need [http://initd.org/tracker/pysqlite pysqlite] 
    92  
    93 === Best Approach === 
    94 - easy_install pysqlite 
    95  
    96 == PostgreSql == 
    97 - Download and install from [http://www.stickpeople.com/projects/python/win-psycopg/index.html here]. 
    98  
    99  
    100 = MacOS = 
    101  
    102 The easiest way of installed most of the common open source databases on OS X is 
    103 to either use [http://darwinports.opendarwin.org/ DarwinPorts] or 
    104 [http://fink.sourceforge.net/ Fink]. 
    105  
    106 Both of these are package management systems that will install all the dependencies 
    107 for you.  
    108  
    109 To install Darwin Ports, first install GCC from Apple, and then install the dmg 
    110 from Darwin Ports [http://darwinports.opendarwin.org/getdp/] and follow the instructions 
    111 on the Darwin Ports site. 
    112  
    113 == MySql == 
    114  
    115 For Darwin Ports 
    116  
    117 $ sudo port install mysql4 +server 
    118  
    119 or 
    120  
    121 $ sudo port install mysql5 +server 
    122  
    123 == SQLite == 
    124  
    125 For Darwin Ports 
    126  
    127 $ sudo port install sqlite2 
    128  
    129 == PostgreSql == 
    130  
    131 For Darwin Ports 
    132  
    133 $ sudo port install postgresql8 
    134  
    135 or 
    136  
    137 $ sudo port install portgresql7