| | 1 | = Additional Build/Install Documentation = |
| | 2 | |
| | 3 | Hopefully, the basic install docs in |
| | 4 | [http://allmydata.org/source/tahoe/trunk/docs/install.html docs/install.html] |
| | 5 | are enough for the most common use cases. This page provides additional |
| | 6 | information for specific platforms. |
| | 7 | |
| | 8 | Please feel free to add sections to this page with anything you might learn |
| | 9 | while building Tahoe on other platforms. Information which may be useful in |
| | 10 | the most general cases will be folded into docs/install.html . |
| | 11 | |
| | 12 | == Overview == |
| | 13 | |
| | 14 | Tahoe is happy to build and run in-place, from a source tree. It is not |
| | 15 | necessary to install it (outside the source tree) before use, but if you'd |
| | 16 | like to do so, please read the "Installing Outside The Source Tree" section |
| | 17 | below. |
| | 18 | |
| | 19 | However, it does need to be "built" before running it in place. While Tahoe |
| | 20 | itself is pure-python and therefore does not require a distinct compile step, |
| | 21 | the mechanics that make it easy to run-in-place do require a setup phase. In |
| | 22 | addition, Tahoe uses several third-party python libraries to work its magic, |
| | 23 | many of which are unlikely to be just "lying around" and already installed. |
| | 24 | Several of these use compiled C code, so they '''do''' require a compile |
| | 25 | step. |
| | 26 | |
| | 27 | The "make all" target will download and build any third-party libraries that |
| | 28 | are not already available on your system. It will also prepare the source |
| | 29 | tree for running-in-place. The details: this target is equivalent to |
| | 30 | executing "{{{setup.py build_tahoe}}}", and basically does a |
| | 31 | "{{{setup.py develop}}}" into a tree-local |
| | 32 | {{{./support/lib/python2.5/site-packages/}}} directory. The {{{bin/tahoe}}} |
| | 33 | executable knows that it should add this directory to PYTHONPATH before it |
| | 34 | does anything else. |
| | 35 | |
| | 36 | After building, you can run the source tree's {{{bin/tahoe}}} script to |
| | 37 | create, configure, and use your new Tahoe node. As long as {{{bin/tahoe}}} is |
| | 38 | left inside the built source tree, it can be run from anywhere (even through a |
| | 39 | symlink). So until you delete the source tree, you can |
| | 40 | symlink {{{~/bin/tahoe}}} to your source tree's {{{bin/tahoe}}} and then use |
| | 41 | it as you would any other system executable. |
| | 42 | |
| | 43 | == Installing Outside The Source Tree == |
| | 44 | |
| | 45 | If you want to use Tahoe without keeping the source tree around, you will |
| | 46 | need to actually install it somewhere. You have several options. |
| | 47 | |
| | 48 | === Installing The Latest Release === |
| | 49 | |
| | 50 | "{{{easy_install allmydata-tahoe}}}", run from any system that has |
| | 51 | easy_install and setuptools installed, will download the latest release of |
| | 52 | Tahoe (and its dependencies, all found via PyPI), build everything, and |
| | 53 | install it into the standard place for python libraries on your system. On |
| | 54 | unix platforms this usually goes into {{{/usr/lib/python2.5/site-packages/}}} |
| | 55 | and {{{/usr/bin/tahoe}}} . |
| | 56 | |
| | 57 | On Debian or Ubuntu linux systems, you can install pre-compiled packages by |
| | 58 | adding the allmydata.org APT repository to your {{{/etc/apt/sources.list}}} |
| | 59 | and installing the "allmydata-tahoe" package. See DownloadDebianPackages for |
| | 60 | details. |
| | 61 | |
| | 62 | Windows users can use an installer, which also provides the |
| | 63 | [http://allmydata.com AllMyData] backup client, and a SMB/winfuse -based |
| | 64 | frontend. These installers can be downloaded from (TODO: they're built, but |
| | 65 | where are they downloadable?). |
| | 66 | |
| | 67 | Mac users can use a .dmg file (also an installer?), which provides a simple |
| | 68 | GUI app to launch the tahoe node. These can be downloaded from (TODO: same |
| | 69 | problem). |
| | 70 | |
| | 71 | === Installing From A Source Tree === |
| | 72 | |
| | 73 | These commands will take the current source tree and install its contents |
| | 74 | somewhere else on your system. This is the traditional meaning of "install". |
| | 75 | |
| | 76 | The "{{{setup.py install}}}" target will install Tahoe (but not its |
| | 77 | dependencies) into the standard place for python libraries on your system: on |
| | 78 | Unix platforms this usually goes into {{{/usr/lib/python2.5/site-packages/}}} |
| | 79 | and {{{/usr/bin/tahoe}}} . |
| | 80 | |
| | 81 | The "{{{make install}}}" target is a wrapper around "{{{setup.py install}}}" |
| | 82 | that uses {{{--single-version-externally-managed}}} to bypass the extra |
| | 83 | checking that setuptools does. This allows "{{{make install}}}" and |
| | 84 | "{{{make install PREFIX=/usr/local}}}" to work the same way as traditional unix |
| | 85 | software (via GNU autoconf, etc). |
| | 86 | |
| | 87 | TODO: There should be some way to use "{{{setup.py easy_install}}}" to install |
| | 88 | Tahoe '''and''' its dependencies into the system somewhere, but I haven't |
| | 89 | been able to figure out how. |
| | 90 | |
| | 91 | === Creating a binary distribution From A Source Tree === |
| | 92 | |
| | 93 | These commands will take the current source tree and create a single-file |
| | 94 | installer (or some other form of binary distribution). The |
| | 95 | installer-like-thing can then be moved to some other system and installed |
| | 96 | there. |
| | 97 | |
| | 98 | The "{{{setup.py bdist_egg}}}" command will create a single-file .egg in the |
| | 99 | {{{dist/}}} directory, which can be manually copied onto your PYTHONPATH |
| | 100 | somewhere. The .egg will declare its dependencies, but will not include them: |
| | 101 | you must arrange for them to be installed before the .egg will be usable. |
| | 102 | |
| | 103 | The "{{{make deb-PLATFORM-head}}}" target (i.e. {{{make deb-hardy-head}}}) |
| | 104 | will create a debian package with the current tree's Tahoe code. This .deb |
| | 105 | file will be placed in the parent directory. The debian package will declare |
| | 106 | dependencies on the other libraries that it needs (like foolscap and zfec), |
| | 107 | but it will not include any code from them. The allmydata.org APT repository |
| | 108 | (see DownloadDebianPackages for details) has packages for the dependencies |
| | 109 | that aren't already in Debian proper. |
| | 110 | |
| | 111 | The "{{{make windows-exe}}}" and "{{{make windows-installer}}}" commands will |
| | 112 | create a windows executable, and the corresponding installer. |
| | 113 | |
| | 114 | The "{{{make mac-exe}}}" and "{{{make mac-dist}}}" commands will create a |
| | 115 | Macintosh OS-X executable and the corresponding installer (.dmg) file. |
| | 116 | |
| | 117 | == Platform-specific Notes == |
| | 118 | |
| | 119 | === Debian/Ubuntu === |
| | 120 | |
| | 121 | The Tahoe build process will download and install many of its dependencies |
| | 122 | when you run {{{make}}} or {{{setup.py build_tahoe}}}. The base set of |
| | 123 | functionality that it cannot build on its own are provided by the following |
| | 124 | debian packages (note that the authoritative list of packages is in the |
| | 125 | "{{{Build-Depends:}}}" clause of |
| | 126 | [source:misc/sid/debian/control misc/sid/debian/control]): |
| | 127 | |
| | 128 | * build-essential (this includes gcc, g++, make, and the headers in libc-dev) |
| | 129 | * debhelper |
| | 130 | * cdbs |
| | 131 | * python-central |
| | 132 | * python-setuptools |
| | 133 | * python |
| | 134 | * python-dev |
| | 135 | |
| | 136 | In addition, to use the "{{{make deb-PLATFORM-head}}}" target, you will also |
| | 137 | need the "debchange" utility from the "devscripts" package, and the |
| | 138 | "fakeroot" package. |
| | 139 | |
| | 140 | To actually run a Tahoe node from a debian package, you will need the |
| | 141 | supporting libraries installed. The authoritative list of packages is in the |
| | 142 | {{{Depends:}}} clause of |
| | 143 | [source:misc/sid/debian/control misc/sid/debian/control], and includes: |
| | 144 | |
| | 145 | * python-twisted-core |
| | 146 | * python-twisted-names |
| | 147 | * python-foolscap |
| | 148 | * python-pyopenssl |
| | 149 | * python-nevow |
| | 150 | * python-simplejson |
| | 151 | * python-zfec |
| | 152 | * python-pycryptopp |
| | 153 | |
| | 154 | Even if you don't intend to create a Tahoe .deb package, you can install the |
| | 155 | supporting libraries from debian packages to reduce the build-time |
| | 156 | download-and-compile work. |
| | 157 | |