Ticket #4878: new-install.diff
File new-install.diff, 10.9 KB (added by , 17 years ago) |
---|
-
docs/install.txt
11 11 12 12 It works with any Python version 2.3 and higher. 13 13 14 Get Python at http://www.python.org. If you're running Linux or Mac OS X, you 15 probably already have it installed. 14 Python is available from http://www.python.org. If you are running Linux or 15 Mac OS X, you probably already have a suitable version installed. If you are 16 running Windows, you will almost certainly need to download the latest Windows 17 MSI installer package for your particular machine architecture (Intel x86, 18 AMD 64 or Itanium). Double-clicking on the MSI file will then begin the 19 installation process. 16 20 17 21 Install Apache and mod_python 18 22 ============================= 19 23 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. 24 If you just want to experiment with Django, skip ahead to the next section; 25 Django includes a lightweight web server you can use for testing, until you're 26 ready to deploy Django in production. 24 27 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. Djangorequires Apache 2.x and mod_python 3.x.28 If you want to use Django on a production site, use the Apache_ web server 29 with `mod_python`_. mod_python is similar to mod_perl -- it embeds Python 30 within Apache and loads Python code into memory when the server starts. Code 31 stays in memory throughout the life of an Apache process, which leads to 32 significant performance gains over other server arrangements. Django 33 requires Apache 2.x and mod_python 3.x. 31 34 32 See `How to use Django with mod_python`_ for information on how to configure 33 mod_python once you have it installed. 35 Apache is available as source code for all major platforms. If you are 36 running Windows, you will probably be better off `downloading it in binary 37 form`_ as an MSI package. If you require SSL support, make sure that you 38 download the 'openssl' version of the installer, not the 'no_ssl' version. 39 The installer will prompt you to supply basic information such as domain, 40 server name, administrator email address and port number (normally 80) as part 41 of the installation procedure, and you will also be able to choose whether 42 to run Apache as a service. 34 43 44 mod_python should be installed after Apache. It, too, can be compiled from 45 source or downloaded as a Windows binary installer program. If you do 46 the latter, be sure to use the version of the installer that matches the 47 versions of Python and Apache running on your system. After installing, you 48 will need to edit ``httpd.conf`` and activate mod_python by adding the 49 following line to the file:: 50 51 LoadModule python_module modules/mod_python.so 52 53 If you can then get Apache to restart successfully, you will be ready to 54 configure it for use with Django -- see `How to use Django with mod_python`_ 55 for further details. 56 35 57 If you can't use mod_python for some reason, fear not: Django follows the WSGI_ 36 58 spec, which allows it to run on a variety of server platforms. See the 37 59 `server-arrangements wiki page`_ for specific installation instructions for 38 60 each platform. 39 61 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 40 71 .. _Apache: http://httpd.apache.org/ 41 72 .. _mod_python: http://www.modpython.org/ 73 .. _downloading it in binary form: http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/ 42 74 .. _WSGI: http://www.python.org/peps/pep-0333.html 43 75 .. _How to use Django with mod_python: ../modpython/ 44 76 .. _server-arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements 77 .. _summarized on the Django wiki: http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer 45 78 46 79 Get your database running 47 80 ========================= 48 81 49 82 If you plan to use Django's database API functionality, you'll need to 50 make sure a database server is running. Django works withPostgreSQL_,51 MySQL_ , Oracle_ and SQLite_ (although SQLite doesn't require a separate server52 to be running).83 make sure that a database is available. Django works with the PostgreSQL_, 84 MySQL_ and Oracle_ database servers and with the SQLite_ embedded database. 85 The latter is a good choice if you are just experimenting with Django. 53 86 54 Additionally, you'll need to make sure your Python database bindings are87 Additionally, you'll need to make sure that your Python database bindings are 55 88 installed. 56 89 57 90 * If you're using PostgreSQL, you'll need the psycopg_ package. Django supports 58 91 both version 1 and 2. (When you configure Django's database layer, specify 59 92 either ``postgresql`` [for version 1] or ``postgresql_psycopg2`` [for version 2].) 60 93 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. 62 96 63 97 * If you're using MySQL, you'll need MySQLdb_, version 1.2.1p2 or higher. 64 98 You will also want to read the database-specific notes for the `MySQL backend`_. 65 99 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. 67 105 68 106 * If you're using Oracle, you'll need cx_Oracle_, version 4.3.1 or higher. 69 107 … … 81 119 .. _MySQL: http://www.mysql.com/ 82 120 .. _Django's ticket system: http://code.djangoproject.com/report/1 83 121 .. _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/ 85 123 .. _MySQLdb: http://sourceforge.net/projects/mysql-python 86 124 .. _SQLite: http://www.sqlite.org/ 87 125 .. _pysqlite: http://initd.org/tracker/pysqlite … … 131 169 Check the `distribution specific notes`_ to see if your 132 170 platform/distribution provides official Django packages/installers. 133 171 Distribution-provided packages will typically allow for automatic 134 installation of depend ancies and easy upgrade paths.172 installation of dependencies and easy upgrade paths. 135 173 136 174 Installing an official release 137 175 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 151 189 privileges and run the command ``setup.py install``. 152 190 153 191 These commands will install Django in your Python installation's 154 ``site-packages`` directory. 192 ``site-packages`` directory -- see "Where are my ``site-packages`` stored?" 193 above for information on how to locate this directory. 155 194 156 195 .. _distribution specific notes: ../distributions/ 157 196 .. _bsdtar: http://gnuwin32.sourceforge.net/packages/bsdtar.htm … … 163 202 If you'd like to be able to update your Django code occasionally with the 164 203 latest bug fixes and improvements, follow these instructions: 165 204 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.) 205 1. 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. 169 213 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. 171 218 219 2. Check out Django's main development branch (the 'trunk') from a 220 a command shell like so:: 221 172 222 svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk 173 223 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 174 231 3. Next, make sure that the Python interpreter can load Django's code. There 175 232 are various ways of accomplishing this. One of the most convenient, on 176 Linux, Mac OS X 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:: 177 234 178 235 ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django 179 236 … … 205 262 any directory, rather than having to qualify the command with the full path 206 263 to the file. 207 264 208 You *don't* have to run ``python setup.py install`` , because you've already209 carried out the equivalent actions in steps 3 and 4.265 You *don't* have to run ``python setup.py install`` here, because you've 266 already carried out the equivalent actions in steps 3 and 4. 210 267 211 268 When 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. 269 command ``svn update`` from within the ``django-trunk`` directory. Or, if 270 you are using TortoiseSVN on Windows, right-click on this directory and 271 choose *TortoiseSVN*, followed by *Update*, from the Windows Explorer 272 context menu. When you do this, Subversion will automatically download any 273 changes. 214 274 215 275 .. _`download page`: http://www.djangoproject.com/download/ 216 276 .. _Subversion: http://subversion.tigris.org/ 277 .. _TortoiseSVN: http://tortoisesvn.tigris.org/ 217 278 .. _from the Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx