diff options
Diffstat (limited to 'docs/topics/install.txt')
-rw-r--r-- | docs/topics/install.txt | 81 |
1 files changed, 45 insertions, 36 deletions
diff --git a/docs/topics/install.txt b/docs/topics/install.txt index d53f49de46..2965c32ab6 100644 --- a/docs/topics/install.txt +++ b/docs/topics/install.txt @@ -1,5 +1,3 @@ -.. _topics-install: - ===================== How to install Django ===================== @@ -11,9 +9,9 @@ Install Python Being a Python Web framework, Django requires Python. -It works with any Python version from 2.4 to 2.6 (due to backwards +It works with any Python version from 2.4 to 2.7 (due to backwards incompatibilities in Python 3.0, Django does not currently work with -Python 3.0; see :ref:`the Django FAQ <faq-install>` for more +Python 3.0; see :doc:`the Django FAQ </faq/install>` for more information on supported Python versions and the 3.0 transition). Get Python at http://www.python.org. If you're running Linux or Mac OS X, you @@ -22,34 +20,45 @@ probably already have it installed. .. admonition:: Django on Jython If you use Jython_ (a Python implementation for the Java platform), you'll - need to follow a few additional steps. See :ref:`howto-jython` for details. + need to follow a few additional steps. See :doc:`/howto/jython` for details. .. _jython: http://jython.org/ Install Apache and mod_wsgi ============================= -If you just want to experiment with Django, skip ahead to the next section; -Django includes a lightweight web server you can use for testing, so you won't -need to set up Apache until you're ready to deploy Django in production. - -If you want to use Django on a production site, use Apache with `mod_wsgi`_. -mod_wsgi is similar to mod_perl -- it embeds Python within Apache and loads -Python code into memory when the server starts. Code stays in memory throughout -the life of an Apache process, which leads to significant performance gains over -other server arrangements. Make sure you have Apache installed, with the -mod_wsgi module activated. Django will work with any version of Apache that -supports mod_wsgi. - -See :ref:`How to use Django with mod_wsgi <howto-deployment-modwsgi>` for -information on how to configure mod_wsgi once you have it installed. - -If you can't use mod_wsgi for some reason, fear not: Django supports many other -deployment options. A great second choice is :ref:`mod_python -<howto-deployment-modpython>`, the predecessor to mod_wsgi. Additionally, Django -follows the WSGI_ spec, which allows it to run on a variety of server platforms. -See the `server-arrangements wiki page`_ for specific installation instructions -for each platform. +If you just want to experiment with Django, skip ahead to the next +section; Django includes a lightweight web server you can use for +testing, so you won't need to set up Apache until you're ready to +deploy Django in production. + +If you want to use Django on a production site, use Apache with +`mod_wsgi`_. mod_wsgi can operate in one of two modes: an embedded +mode and a daemon mode. In embedded mode, mod_wsgi is similar to +mod_perl -- it embeds Python within Apache and loads Python code into +memory when the server starts. Code stays in memory throughout the +life of an Apache process, which leads to significant performance +gains over other server arrangements. In daemon mode, mod_wsgi spawns +an independent daemon process that handles requests. The daemon +process can run as a different user than the webserver, possibly +leading to improved security, and the daemon process can be restarted +without restarting the entire Apache webserver, possibly making +refreshing your codebase more seamless. Consult the mod_wsgi +documentation to determine which mode is right for your setup. Make +sure you have Apache installed, with the mod_wsgi module activated. +Django will work with any version of Apache that supports mod_wsgi. + +See :doc:`How to use Django with mod_wsgi </howto/deployment/modwsgi>` +for information on how to configure mod_wsgi once you have it +installed. + +If you can't use mod_wsgi for some reason, fear not: Django supports +many other deployment options. Another option is :doc:`FastCGI +</howto/deployment/fastcgi>`, perfect for using Django with servers +other than Apache. Additionally, Django follows the WSGI_ spec, which +allows it to run on a variety of server platforms. See the +`server-arrangements wiki page`_ for specific installation +instructions for each platform. .. _Apache: http://httpd.apache.org/ .. _mod_wsgi: http://code.google.com/p/modwsgi/ @@ -90,8 +99,8 @@ database bindings are installed. If you're on Windows, check out the unofficial `compiled Windows version`_. * If you're using MySQL, you'll need MySQLdb_, version 1.2.1p2 or higher. You - will also want to read the database-specific notes for the :ref:`MySQL - backend <ref-databases>`. + will also want to read the database-specific notes for the :doc:`MySQL + backend </ref/databases>`. * If you're using SQLite and Python 2.4, you'll need pysqlite_. Use version 2.0.3 or higher. Python 2.5 ships with an SQLite wrapper in the standard @@ -115,7 +124,7 @@ can simply grant Django ``SELECT``, ``INSERT``, ``UPDATE`` and ``ALTER TABLE`` privileges during ``syncdb`` but won't issue ``ALTER TABLE`` statements on a table once ``syncdb`` has created it. -If you're using Django's :ref:`testing framework<topics-testing>` to test database queries, +If you're using Django's :doc:`testing framework</topics/testing>` to test database queries, Django will need permission to create a test database. .. _PostgreSQL: http://www.postgresql.org/ @@ -177,7 +186,7 @@ It's easy, no matter which way you choose. Installing a distribution-specific package ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Check the :ref:`distribution specific notes <misc-distributions>` to see if your +Check the :doc:`distribution specific notes </misc/distributions>` to see if your platform/distribution provides official Django packages/installers. Distribution-provided packages will typically allow for automatic installation of dependencies and easy upgrade paths. @@ -257,15 +266,15 @@ latest bug fixes and improvements, follow these instructions: links. (Environment variables can be defined on Windows systems `from the Control Panel`_.) - .. admonition:: What about Apache and mod_python? + .. admonition:: What about Apache and mod_wsgi? - If you take the approach of setting ``PYTHONPATH``, you'll need to - remember to do the same thing in your Apache configuration once you - deploy your production site. Do this by setting ``PythonPath`` in your - Apache configuration file. + If you take the approach of setting ``PYTHONPATH``, you'll need + to remember to do the same thing in your WSGI application once + you deploy your production site. Do this by appending to + ``sys.path`` in your WSGI application. More information about deployment is available, of course, in our - :ref:`How to use Django with mod_python <howto-deployment-modpython>` + :doc:`How to use Django with mod_wsgi </howto/deployment/modwsgi>` documentation. 4. On Unix-like systems, create a symbolic link to the file |