Ticket #4878: new-install.diff

File new-install.diff, 10.9 KB (added by Nick Efford, 17 years ago)

Revised version of patch to install.txt

  • docs/install.txt

     
    1111
    1212It works with any Python version 2.3 and higher.
    1313
    14 Get Python at http://www.python.org. If you're running Linux or Mac OS X, you
    15 probably already have it installed.
     14Python is available from http://www.python.org. If you are running Linux or
     15Mac OS X, you probably already have a suitable version installed.  If you are
     16running Windows, you will almost certainly need to download the latest Windows
     17MSI installer package for your particular machine architecture (Intel x86,
     18AMD 64 or Itanium).  Double-clicking on the MSI file will then begin the
     19installation process.
    1620
    1721Install Apache and mod_python
    1822=============================
    1923
    20 If you just want to experiment with Django, skip ahead to the next
    21 section; Django includes a lightweight web server you can use for
    22 testing, so you won't need to set up Apache until you're ready to
    23 deploy Django in production.
     24If you just want to experiment with Django, skip ahead to the next section;
     25Django includes a lightweight web server you can use for testing, until you're
     26ready to deploy Django in production.
    2427
    25 If you want to use Django on a production site, use Apache with `mod_python`_.
    26 mod_python is similar to mod_perl -- it embeds Python within Apache and loads
    27 Python code into memory when the server starts. Code stays in memory throughout
    28 the life of an Apache process, which leads to significant performance gains
    29 over other server arrangements. Make sure you have Apache installed, with the
    30 mod_python module activated. Django requires Apache 2.x and mod_python 3.x.
     28If you want to use Django on a production site, use the Apache_ web server
     29with `mod_python`_.  mod_python is similar to mod_perl -- it embeds Python
     30within Apache and loads Python code into memory when the server starts. Code
     31stays in memory throughout the life of an Apache process, which leads to
     32significant performance gains over other server arrangements.  Django
     33requires Apache 2.x and mod_python 3.x.
    3134
    32 See `How to use Django with mod_python`_ for information on how to configure
    33 mod_python once you have it installed.
     35Apache is available as source code for all major platforms.  If you are
     36running Windows, you will probably be better off `downloading it in binary
     37form`_ as an MSI package.  If you require SSL support, make sure that you
     38download the 'openssl' version of the installer, not the 'no_ssl' version.
     39The installer will prompt you to supply basic information such as domain,
     40server name, administrator email address and port number (normally 80) as part
     41of the installation procedure, and you will also be able to choose whether
     42to run Apache as a service.
    3443
     44mod_python should be installed after Apache.  It, too, can be compiled from
     45source or downloaded as a Windows binary installer program.  If you do
     46the latter, be sure to use the version of the installer that matches the
     47versions of Python and Apache running on your system.  After installing, you
     48will need to edit ``httpd.conf`` and activate mod_python by adding the
     49following line to the file::
     50
     51  LoadModule python_module modules/mod_python.so
     52
     53If you can then get Apache to restart successfully, you will be ready to
     54configure it for use with Django -- see `How to use Django with mod_python`_
     55for further details.
     56
    3557If you can't use mod_python for some reason, fear not: Django follows the WSGI_
    3658spec, which allows it to run on a variety of server platforms. See the
    3759`server-arrangements wiki page`_ for specific installation instructions for
    3860each platform.
    3961
     62.. admonition:: What about Internet Information Server?
     63
     64   If you are a Windows user, you may be wondering whether it is possible
     65   to run Django on Microsoft's own web server, IIS.  Considerable progress
     66   has been made towards this goal, `summarized on the Django wiki`_, but
     67   the current procedure is not trivial, and some issues remain unresolved.
     68   If you have expertise in IIS and ISAPI extensions, your assistance in
     69   dealing with these issues would be much appreciated!
     70
    4071.. _Apache: http://httpd.apache.org/
    4172.. _mod_python: http://www.modpython.org/
     73.. _downloading it in binary form: http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/
    4274.. _WSGI: http://www.python.org/peps/pep-0333.html
    4375.. _How to use Django with mod_python: ../modpython/
    4476.. _server-arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
     77.. _summarized on the Django wiki: http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer
    4578
    4679Get your database running
    4780=========================
    4881
    4982If you plan to use Django's database API functionality, you'll need to
    50 make sure a database server is running. Django works with PostgreSQL_,
    51 MySQL_, Oracle_ and SQLite_ (although SQLite doesn't require a separate server
    52 to be running).
     83make sure that a database is available. Django works with the PostgreSQL_,
     84MySQL_ and Oracle_ database servers and with the SQLite_ embedded database.
     85The latter is a good choice if you are just experimenting with Django.
    5386
    54 Additionally, you'll need to make sure your Python database bindings are
     87Additionally, you'll need to make sure that your Python database bindings are
    5588installed.
    5689
    5790* If you're using PostgreSQL, you'll need the psycopg_ package. Django supports
    5891  both version 1 and 2. (When you configure Django's database layer, specify
    5992  either ``postgresql`` [for version 1] or ``postgresql_psycopg2`` [for version 2].)
    6093
    61   If you're on Windows, check out the unofficial `compiled Windows version`_.
     94  If you're on Windows, check out the unofficial `compiled Windows versions`_
     95  and choose the one that matches your versions of Python and PostgreSQL.
    6296
    6397* If you're using MySQL, you'll need MySQLdb_, version 1.2.1p2 or higher.
    6498  You will also want to read the database-specific notes for the `MySQL backend`_.
    6599
    66 * If you're using SQLite, you'll need pysqlite_. Use version 2.0.3 or higher.
     100* If you're using SQLite with Python 2.3 or 2.4, you'll need pysqlite_, version
     101  2.0.3 or higher.  Python 2.5 comes with the necessary SQLite bindings as
     102  standard.  If you are running Windows, note that the binary distributions
     103  of pysqlite include SQLite itself, so using one of these will save you
     104  some time.
    67105
    68106* If you're using Oracle, you'll need cx_Oracle_, version 4.3.1 or higher.
    69107
     
    81119.. _MySQL: http://www.mysql.com/
    82120.. _Django's ticket system: http://code.djangoproject.com/report/1
    83121.. _psycopg: http://initd.org/tracker/psycopg
    84 .. _compiled Windows version: http://stickpeople.com/projects/python/win-psycopg/
     122.. _compiled Windows versions: http://stickpeople.com/projects/python/win-psycopg/
    85123.. _MySQLdb: http://sourceforge.net/projects/mysql-python
    86124.. _SQLite: http://www.sqlite.org/
    87125.. _pysqlite: http://initd.org/tracker/pysqlite
     
    131169Check the `distribution specific notes`_ to see if your
    132170platform/distribution provides official Django packages/installers.
    133171Distribution-provided packages will typically allow for automatic
    134 installation of dependancies and easy upgrade paths.
     172installation of dependencies and easy upgrade paths.
    135173
    136174Installing an official release
    137175~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    151189       privileges and run the command ``setup.py install``.
    152190
    153191These commands will install Django in your Python installation's
    154 ``site-packages`` directory.
     192``site-packages`` directory -- see "Where are my ``site-packages`` stored?"
     193above for information on how to locate this directory.
    155194
    156195.. _distribution specific notes: ../distributions/
    157196.. _bsdtar: http://gnuwin32.sourceforge.net/packages/bsdtar.htm
     
    163202If you'd like to be able to update your Django code occasionally with the
    164203latest bug fixes and improvements, follow these instructions:
    165204
    166 1. Make sure that you have Subversion_ installed, and that you can run its
    167    commands from a shell. (Enter ``svn help`` at a shell prompt to test
    168    this.)
     2051. Make sure that you have Subversion_ installed.  You can download it
     206   as source and compile it yourself, or use one of the unofficial binary
     207   packages.  If you are running Windows, make sure that you download
     208   the binary that matches your version of Apache (2.0 or 2.2), as this
     209   will allow you to then run Apache as a Subversion server if you wish.
     210   If you are a Windows user, you will probably also want to install
     211   TortoiseSVN_, a Subversion client implemented as a Windows shell
     212   extension.
    169213
    170 2. Check out Django's main development branch (the 'trunk') like so::
     214   After installing, make sure that you can run Subversion commands
     215   commands from a shell.  Enter ``svn help`` at a shell prompt to test
     216   this.  If you are using TortoiseSVN on Windows, make sure that the
     217   *TortoiseSVN* menu is visible in the *File* menu of Windows Explorer.
    171218
     2192. Check out Django's main development branch (the 'trunk') from a
     220   a command shell like so::
     221
    172222       svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
    173223
     224   If you are using TortoiseSVN on Windows, go to the folder within which
     225   you wish to check out the trunk, right-click to bring up the context
     226   menu and select *TortoiseSVN*, followed by *Checkout..*.  In the
     227   resulting dialog box, enter http://code.djangoproject.com/svn/django/trunk/
     228   as the URL of the repository and the name of a new or empty folder as the
     229   checkout directory.
     230
    1742313. Next, make sure that the Python interpreter can load Django's code. There
    175232   are various ways of accomplishing this.  One of the most convenient, on
    176    Linux, Mac OSX or other Unix-like systems, is to use a symbolic link::
     233   Linux, Mac OS X or other Unix-like systems, is to use a symbolic link::
    177234
    178235       ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django
    179236
     
    205262   any directory, rather than having to qualify the command with the full path
    206263   to the file.
    207264
    208 You *don't* have to run ``python setup.py install``, because you've already
    209 carried out the equivalent actions in steps 3 and 4.
     265You *don't* have to run ``python setup.py install`` here, because you've
     266already carried out the equivalent actions in steps 3 and 4.
    210267
    211268When you want to update your copy of the Django source code, just run the
    212 command ``svn update`` from within the ``django-trunk`` directory. When you do
    213 this, Subversion will automatically download any changes.
     269command ``svn update`` from within the ``django-trunk`` directory.  Or, if
     270you are using TortoiseSVN on Windows, right-click on this directory and
     271choose *TortoiseSVN*, followed by *Update*, from the Windows Explorer
     272context menu.  When you do this, Subversion will automatically download any
     273changes.
    214274
    215275.. _`download page`: http://www.djangoproject.com/download/
    216276.. _Subversion: http://subversion.tigris.org/
     277.. _TortoiseSVN: http://tortoisesvn.tigris.org/
    217278.. _from the Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx
Back to Top