Changes between Version 4 and Version 5 of TracInstall
- Timestamp:
- 01/28/15 17:06:11 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracInstall
v4 v5 1 {{{#!div style="margin-top: .5em; padding: 0 1em; background-color: #ffd; border:1px outset #ddc; text-align: center"2 3 '''NOTE: the information in this page applies to Trac 1.0, the current version of Trac. \\4 For installing previous Trac versions, please refer to [[wiki:0.12/TracInstall]] (for Trac 0.12)'''5 }}}6 7 1 = Trac Installation Guide for 1.0 8 2 [[TracGuideToc]] … … 10 4 Trac is written in the Python programming language and needs a database, [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL], or [http://mysql.com/ MySQL]. For HTML rendering, Trac uses the [http://genshi.edgewall.org Genshi] templating system. 11 5 12 Since version 0.12, Trac can also be localized, and there 's probably a translation available for your language. If you want to be able to use the Trac interface in other languages, then make sure you have installed the optional package [#OtherPythonPackages Babel]. Pay attention to the extra steps for localization support in the [#InstallingTrac Installing Trac] section below. Lacking Babel, you will only get the default English version, as usual.6 Since version 0.12, Trac can also be localized, and there is probably a translation available in your language. If you want to use the Trac interface in other languages, then make sure you have installed the optional package [#OtherPythonPackages Babel]. Pay attention to the extra steps for localization support in the [#InstallingTrac Installing Trac] section below. Lacking Babel, you will only get the default English version. 13 7 14 8 If you're interested in contributing new translations for other languages or enhance the existing translations, then please have a look at [trac:wiki:TracL10N TracL10N]. 15 9 16 What follows are generic instructions for installing and setting up Trac and its requirements. While you may find instructions for installing Trac on specific systems at [trac:TracInstallPlatforms TracInstallPlatforms] on the main Trac site, please be sure to'''first read through these general instructions''' to get a good understanding of the tasks involved.10 What follows are generic instructions for installing and setting up Trac. While you may find instructions for installing Trac on specific systems at [trac:TracInstallPlatforms TracInstallPlatforms] on the main Trac site, please '''first read through these general instructions''' to get a good understanding of the tasks involved. 17 11 18 12 [[PageOutline(2-3,Installation Steps,inline)]] … … 27 21 * [http://genshi.edgewall.org/wiki/Download Genshi], version >= 0.6 28 22 29 You also need a database system and the corresponding python bindings. 30 The database can be either SQLite, PostgreSQL or MySQL. 23 You also need a database system and the corresponding python bindings. The database can be either SQLite, PostgreSQL or MySQL. 31 24 32 25 ==== For the SQLite database #ForSQLite 33 26 34 As you must be using Python 2.5, 2.6 or 2.7, you already have the SQLite database bindings bundled with the standard distribution of Python (the `sqlite3` module).35 36 However, if you 'dlike, you can download the latest and greatest version of [[trac:PySqlite]] from27 As you must be using Python 2.5, 2.6 or 2.7, you already have the SQLite database bindings bundled with the standard distribution of Python: the `sqlite3` module. 28 29 However, if you like, you can download the latest and greatest version of [[trac:PySqlite]] from 37 30 [http://code.google.com/p/pysqlite/downloads/list google code], where you'll find the Windows 38 31 installers or the `tar.gz` archive for building from source: … … 43 36 }}} 44 37 45 This will download the latest SQLite code and build the bindings. 46 47 SQLite 2.x is no longer supported. 48 49 A known bug in PySqlite versions 2.5.2-4 prohibits upgrades of Trac databases 50 from 0.11.x to 0.12. Please use versions 2.5.5 and newer or 2.5.1 and 51 older. See #9434 for more detail. 52 53 See additional information in [trac:PySqlite PySqlite]. 38 This will download the latest SQLite code and build the bindings. SQLite 2.x is no longer supported. 39 40 A known bug in [trac:PySqlite] versions 2.5.2-4 prohibits upgrades of Trac databases from 0.11.x to 0.12. Please use versions 2.5.5 and newer or 2.5.1 and older. See #9434 for more detail. See additional information in [trac:PySqlite PySqlite]. 54 41 55 42 ==== For the PostgreSQL database #ForPostgreSQL … … 61 48 See [trac:DatabaseBackend#Postgresql DatabaseBackend] for details. 62 49 63 64 50 ==== For the MySQL database #ForMySQL 65 51 66 Trac can now work quite well with MySQL, provided you follow the guidelines.52 Trac works well with MySQL, provided you follow the guidelines: 67 53 68 54 * [http://mysql.com/ MySQL], version 5.0 or later 69 55 * [http://sf.net/projects/mysql-python MySQLdb], version 1.2.2 or later 70 56 71 It is '''very''' important to read carefully the[trac:MySqlDb] page before creating the database.57 Given the caveats and known issues surrounding MySQL, read carefully the [trac:MySqlDb] page before creating the database. 72 58 73 59 === Optional Dependencies … … 78 64 * [http://subversion.apache.org/ Subversion], 1.5.x or 1.6.x and the '''''corresponding''''' Python bindings. Older versions starting from 1.0, like 1.2.4, 1.3.2 or 1.4.2, etc. should still work. For troubleshooting information, check the [trac:TracSubversion#Troubleshooting TracSubversion] page. 79 65 80 There are [http://subversion.apache.org/packages.html pre-compiled SWIG bindings] available for various platforms. (Good luck finding precompiled SWIG bindings for any Windows package at that listing. TracSubversion points you to [http://alagazam.net Algazam], which works for me under Python 2.6.)66 There are [http://subversion.apache.org/packages.html pre-compiled SWIG bindings] available for various platforms. (Good luck finding precompiled SWIG bindings for any Windows package at that listing. [trac:TracSubversion] points you to [http://alagazam.net Alagazam], which works for me under Python 2.6.) 81 67 82 68 Note that Trac '''doesn't''' use [http://pysvn.tigris.org/ PySVN], neither does it work yet with the newer `ctype`-style bindings. 83 69 84 85 70 '''Please note:''' if using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are currently [trac:ticket:493 not supported]. 86 87 71 88 72 ===== Others … … 93 77 A web server is optional because Trac is shipped with a server included, see the [#RunningtheStandaloneServer Running the Standalone Server] section below. 94 78 95 Alternatively you can configure Trac to run in any of the following environments .79 Alternatively you can configure Trac to run in any of the following environments: 96 80 * [http://httpd.apache.org/ Apache] with 97 81 - [http://code.google.com/p/modwsgi/ mod_wsgi], see [wiki:TracModWSGI] and … … 120 104 an internal time zone implementation. 121 105 122 '''Attention''': The various available versions of these dependencies are not necessarily interchangeable, so please pay attention to the version numbers above. If you are having trouble getting Trac to work please double-check all the dependencies before asking for help on the [trac:MailingList] or [trac:IrcChannel]. 123 124 Please refer to the documentation of these packages to find out how they are best installed. In addition, most of the [trac:TracInstallPlatforms platform-specific instructions] also describe the installation of the dependencies. Keep in mind however that the information there ''probably concern older versions of Trac than the one you're installing'' (there are even some pages that are still talking about Trac 0.8!). 125 106 '''Attention''': The available versions of these dependencies are not necessarily interchangeable, so please pay attention to the version numbers. If you are having trouble getting Trac to work, please double-check all the dependencies before asking for help on the [trac:MailingList] or [trac:IrcChannel]. 107 108 Please refer to the documentation of these packages to find out how they are best installed. In addition, most of the [trac:TracInstallPlatforms platform-specific instructions] also describe the installation of the dependencies. Keep in mind however that the information there ''probably concern older versions of Trac than the one you're installing''. There are even some pages that are still talking about Trac 0.8! 126 109 127 110 == Installing Trac 128 111 === Using `easy_install` 129 One way to install Trac is using [http://pypi.python.org/pypi/setuptools setuptools]. 130 With setuptools you can install Trac from the Subversion repository; 112 One way to install Trac is using [http://pypi.python.org/pypi/setuptools setuptools]. With setuptools you can install Trac from the Subversion repository. 131 113 132 114 A few examples: … … 169 151 All commands (`tracd`, `trac-admin`) are available in `/opt/user/trac/bin`. This can also be leveraged for `mod_python` (using `PythonHandler` directive) and `mod_wsgi` (using `WSGIDaemonProcess` directive) 170 152 171 Additionally, you can install several Trac plugins (listed [http://pypi.python.org/pypi?:action=search&term=trac&submit=search here]) through pip. 172 173 153 Additionally, you can install several Trac plugins (listed [https://pypi.python.org/pypi?:action=browse&show=all&c=516 here]) through pip. 174 154 175 155 === From source 176 Of course, using the python-typical setup at the top of the source directory also works. 177 178 You can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. `Trac-1.0.tar.gz`), or you can get the source directly from the repository (see [trac:SubversionRepository] for details). 156 Of course, using the python-typical setup at the top of the source directory also works. You can obtain the source for a .tar.gz or .zip file corresponding to a release (e.g. `Trac-1.0.tar.gz`), or you can get the source directly from the repository. See [trac:SubversionRepository] for details. 179 157 180 158 {{{#!sh … … 182 160 }}} 183 161 184 ''You 'll need root permissions or equivalent for this step.''162 ''You will need root permissions or equivalent for this step.'' 185 163 186 164 This will byte-compile the Python source code and install it as an .egg file or folder in the `site-packages` directory … … 216 194 The above will place your `tracd` and `trac-admin` commands into `/usr/local/bin` and will install the Trac libraries and dependencies into `/Library/Python/2.5/site-packages`, which is Apple's preferred location for third-party Python application installations. 217 195 218 219 196 == Creating a Project Environment 220 197 221 A [TracEnvironment Trac environment] is the backend storage where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable [TracIni configuration file], and variousother files and directories.198 A [TracEnvironment Trac environment] is the backend where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable [TracIni configuration file], and other files and directories. 222 199 223 200 A new environment is created using [wiki:TracAdmin trac-admin]: … … 235 212 Also note that the values you specify here can be changed later by directly editing the [TracIni conf/trac.ini] configuration file. 236 213 237 When selecting the location of your environment, make sure that the filesystem on which the environment directory resides supports sub-second timestamps (i.e. **not** `ext2` or `ext3` on Linux), as the modification time of the `conf/trac.ini` file will be monitored to decide whether an environment restart is needed or not. A too coarse-grained timestamp resolution may result in inconsistencies in Trac < 1.0.2 (though the best advice is to opt for a platform with sub-second timestamp resolution when possible regardless of the version of Trac you are running).214 When selecting the location of your environment, make sure that the filesystem on which the environment directory resides supports sub-second timestamps (i.e. **not** `ext2` or `ext3` on Linux), as the modification time of the `conf/trac.ini` file will be monitored to decide whether an environment restart is needed or not. A too coarse-grained timestamp resolution may result in inconsistencies in Trac < 1.0.2. The best advice is to opt for a platform with sub-second timestamp resolution, regardless of the Trac version. 238 215 239 216 Finally, make sure the user account under which the web front-end runs will have '''write permissions''' to the environment directory and all the files inside. This will be the case if you run `trac-admin ... initenv` as this user. If not, you should set the correct user afterwards. For example on Linux, with the web server running as user `apache` and group `apache`, enter: … … 247 224 '''Warning:''' Please only use ASCII-characters for account name and project path, unicode characters are not supported there. 248 225 }}} 249 250 226 251 227 == Deploying Trac … … 300 276 Don't forget to check that the web server has the execution right on scripts in the `/usr/share/trac/cgi-bin` directory. 301 277 302 303 278 ==== Mapping Static Resources 304 279 … … 321 296 Assuming the deployment has been done this way: 322 297 {{{#!sh 323 $ trac-admin /var/trac/env deploy /path/to/ trac/htdocs/common298 $ trac-admin /var/trac/env deploy /path/to/shared/trac 324 299 }}} 325 300 … … 366 341 }}} 367 342 368 369 343 ==== Setting up the Plugin Cache 370 344