Changes between Version 23 and Version 24 of InstallDetails


Ignore:
Timestamp:
2010-04-21T15:44:15Z (14 years ago)
Author:
zooko
Comment:

renamed to AdvancedInstall

Legend:

Unmodified
Added
Removed
Modified
  • InstallDetails

    v23 v24  
    1 = Additional !Build/Install Documentation =
    2 
    3 Hopefully, the basic install docs in
    4 [http://tahoe-lafs.org/source/tahoe-lafs/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-LAFS on other platforms. Information which may be useful in
    10 the most general cases will be folded into docs/install.html .
    11 
    12 == Dependencies ==
    13 
    14 The canonical list of dependencies and their versions is in [source:_auto_deps.py]. To see the current versions of those dependencies (plus a few others like the Python interpreter and the operating system) run {{{tahoe --version}}}.
    15 
    16 This isn't a complete list of dependencies though, because some of those packages also have dependencies of their own. To see the complete list of all dependencies, run {{{PYTHONPATH=${PYTHONPATH}:./support/lib/python2.5/site-packages/ python -c "import pkg_resources;print ', '.join([d.project_name+': '+d.version for d in set(pkg_resources.require('allmydata-tahoe'))])"}}}.  An example output from that command is:
    17 
    18 `zope.interface: 3.5.0, simplejson: 2.0.7, pyutil: 1.3.30, zbase32: 1.1.1, allmydata-tahoe: 1.2.0-r3353, pyOpenSSL: 0.7, Twisted: 8.1.0-r25700, Nevow: 0.9.33-r17166, foolscap: 0.3.2, zfec: 1.4.2, pycryptopp: 0.5.12, argparse: 0.8.0, setuptools: 0.6c10dev`
    19 
    20 In addition to these, if you are installing on Microsoft Windows, then you need to manually install [http://sourceforge.net/projects/pywin32 pywin32] before installing Tahoe-LAFS.
    21 
    22 == Overview ==
    23 
    24 Tahoe-LAFS is happy to build and run in-place, from a source tree. It is not
    25 necessary to install it (outside the source tree) before use, but if you'd
    26 like to do so, please read the "Installing Outside The Source Tree" section
    27 below.
    28 
    29 However, it does need to be "built" before running it in place. While Tahoe-LAFS
    30 itself is pure-python and therefore does not require a distinct compile step,
    31 the mechanics that make it easy to run-in-place do require a setup phase. In
    32 addition, Tahoe-LAFS uses several third-party python libraries to work its magic,
    33 many of which are unlikely to be just "lying around" and already installed.
    34 Several of these use compiled C code, so they '''do''' require a compile
    35 step.
    36 
    37 {{{python setup.py build}}} will download and build any third-party libraries that
    38 are not already available on your system. It will also prepare the source
    39 tree for running-in-place. Thios basically does a
    40 "{{{setup.py develop}}}" into a local
    41 {{{./support/lib/python2.5/site-packages/}}} directory. The {{{bin/tahoe}}}
    42 executable knows that it adds this directory to PYTHONPATH before it
    43 does anything else.
    44 
    45 After building, you can run the source tree's {{{bin/tahoe}}} script to
    46 create, configure, and use your new Tahoe-LAFS node. As long as {{{bin/tahoe}}} is
    47 left inside the built source tree, it can be run from anywhere (even through a
    48 symlink). So until you delete the source tree, you can
    49 symlink {{{~/bin/tahoe}}} to your source tree's {{{bin/tahoe}}} and then use
    50 it as you would any other system executable.
    51 
    52 == the "Desert Island" Build ==
    53 
    54 Tahoe-LAFS will download and install most of the libraries it requires when you
    55 run "{{{python setup.py build}}}". You might want to pre-download these libraries: perhaps you
    56 are about to get on an airplane, or you anticipate having poor network
    57 connectivity, or you just don't like the idea of a so-called compile step
    58 using the network (the download step uses !PyPI to figure out where to
    59 download these libraries from, so you might be concerned that it or one of
    60 the project web pages it references has been modified to point at something
    61 malicious).
    62 
    63 This disconnected-build operation is supported in two ways. When building
    64 from a darcs checkout, you can download the latest "tahoe-deps" bundle from
    65 http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-deps.tar.gz . Unpack this in
    66 your source tree, and the build process will grab any necessary libraries
    67 from its {{{tahoe-deps/}}} directory instead of downloading them from the
    68 internet. You can also unpack tahoe-deps into the parent directory to share
    69 it between multiple trees.
    70 
    71 Alternatively, if you are building from a tarball (either a release tarball
    72 from http://tahoe-lafs.org/source/tahoe-lafs/releases/ , or a continually-generated
    73 current-trunk tarball from http://tahoe-lafs.org/source/tahoe-lafs/tarballs/ ), you
    74 can simply download the -SUMO version of the tarball instead of the regular
    75 one. The "SUMO" tarball includes the current tahoe-deps bundle pre-unpacked
    76 in the source tree.
    77 
    78 The tahoe-deps bundle is updated every once in a while, as new versions of
    79 the dependent libraries are released, or as Tahoe becomes dependent upon new
    80 things. The http://tahoe-lafs.org/source/tahoe-lafs/deps/ directory contains
    81 historical ones, but there should never be a reason to use anything but the
    82 latest. The tahoe-deps bundle contains a README that has a version number.
    83 
    84 
    85 == Installing Outside The Source Tree ==
    86 
    87 If you want to use Tahoe-LAFS without keeping the source tree around, you will
    88 need to actually install it somewhere. You have several options.
    89 
    90 === Installing The Latest Release ===
    91 
    92 "{{{easy_install allmydata-tahoe}}}", on any system that has
    93 easy_install and setuptools installed, will download the latest release of
    94 Tahoe-LAFS (and its dependencies, all found via PyPI), build everything, and
    95 install it into the standard place for python libraries on your system. On
    96 unix platforms this usually goes into {{{/usr/lib/python2.5/site-packages/}}}
    97 and {{{/usr/bin/tahoe}}} .
    98 
    99 On Debian or Ubuntu linux systems, you can install pre-compiled packages by
    100 adding the tahoe-lafs.org APT repository to your {{{/etc/apt/sources.list}}}
    101 and installing the "allmydata-tahoe" package. See DownloadDebianPackages for
    102 details.
    103 
    104 Windows users can use an installer, which also provides the
    105 [http://allmydata.com AllMyData] backup client, and a SMB/winfuse -based
    106 frontend. These installers can be downloaded from (TODO: they're built, but
    107 where are they downloadable?).
    108 
    109 Mac users can use a .dmg file (also an installer?), which provides a simple
    110 GUI app to launch the tahoe node. These can be downloaded from (TODO: same
    111 problem).
    112 
    113 === Installing From A Source Tree ===
    114 
    115 These commands will take the current source tree and install its contents
    116 somewhere else on your system. This is the traditional meaning of "install".
    117 
    118 The "{{{setup.py install}}}" target will install Tahoe-LAFS (and its
    119 dependencies) into the standard place for python libraries on your system: on
    120 Unix platforms this usually goes into {{{/usr/lib/python2.5/site-packages/}}}
    121 and {{{/usr/bin/tahoe}}} .
    122 
    123 The "{{{make install}}}" Makefile target is a wrapper around "{{{setup.py install}}}"
    124 that uses {{{--single-version-externally-managed}}} to bypass the extra
    125 checking that setuptools does. This allows "{{{make install}}}"  to work the same way as traditional unix
    126 software (via GNU autoconf, etc).
    127 
    128 ("{{{make install PREFIX=/usr/local}}}" does not currently work -- see #703.)
    129 
    130 === Creating a binary distribution From A Source Tree ===
    131 
    132 These commands will take the current source tree and create a single-file
    133 installer (or some other form of binary distribution). The
    134 installer-like-thing can then be moved to some other system and installed
    135 there.
    136 
    137 The "{{{setup.py bdist_egg}}}" command will create a single-file .egg in the
    138 {{{dist/}}} directory, which can be manually copied onto your PYTHONPATH
    139 somewhere. The .egg will declare its dependencies, but will not include them:
    140 you must arrange for them to be installed before the .egg will be usable.
    141 
    142 The "{{{make deb-PLATFORM-head}}}" target (i.e. {{{make deb-hardy-head}}})
    143 will create a debian package with the current tree's Tahoe code. This .deb
    144 file will be placed in the parent directory. The debian package will declare
    145 dependencies on the other libraries that it needs (like foolscap and zfec),
    146 but it will not include any code from them. The allmydata.org APT repository
    147 (see DownloadDebianPackages for details) has packages for the dependencies
    148 that aren't already in Debian proper.
    149 
    150 The "{{{make windows-exe}}}" and "{{{make windows-installer}}}" commands will
    151 create a windows executable, and the corresponding installer.
    152 
    153 The "{{{make mac-exe}}}" and "{{{make mac-dist}}}" commands will create a
    154 Macintosh OS-X executable and the corresponding installer (.dmg) file.
    155 
    156 == Platform-specific Notes ==
    157 
    158 === !Debian/Ubuntu ===
    159 
    160 Tahoe-LAFS is primarily developed on !Debian/Ubuntu machines. You can either build
    161 from source (as described by this page), or download pre-compiled debian
    162 packages for several distributions. See the DownloadDebianPackages page for
    163 details.
    164 
    165 === CentOS 5.4 ===
    166 
    167 For installing in CentOS 5.4 you need this list of package:
    168 
    169 yum install gcc python-devel sqlite-devel gcc-c++ openssl-devel
    170 
    171 Installing for dependencies:
    172 cpp glibc-devel glibc-headers kernel-headers libgomp libstdc++-devel e2fsprogs-devel  keyutils-libs-devel krb5-devel libselinux-devel libsepol-devel zlib-devel
    173 
    174 
    175 
    176 === Mac ===
    177 
    178 You will need the standard Xcode development tools installed, or at least GCC in order to build some dependencies. Note that Xcode is quite large (2.5GB) so plan accordingly if you will need to download it.
    179 
    180 === Windows ===
    181 
    182 The following procedure will install and run Tahoe-LAFS on Windows.  Note that this assumes that you install Python in the default location (C:\Python26), if you choose another location you'll need to adjust the instructions below:
    183 
    184 1. Download and install Python 2.6.2 from http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi.
    185 
    186 2. Download and install pywin32 from http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.6.exe/download.
    187 
    188 3. Download the latest Tahoe-LAFS snapshot from http://tahoe-lafs.org/source/tahoe-lafs/snapshots/. Unpack it in a convenient place, such as C:\tahoe-lafs.
    189 
    190 4. Open a command prompt and cd to the top of the Tahoe-LAFS tree (e.g. {{{cd \tahoe-lafs}}}).
    191 
    192 5. Run "{{{C:\Python26\python setup.py build}}}". Wait a bit until it stops working. Note that you need a working network connection because it will download various dependencies. Ignore any warnings referring to darcs.
    193 
    194 6. Run "{{{C:\Python26\python setup.py install}}}". Wait a bit until it stops working. Again, you may need a working network connection.
    195 
    196 7. Run "{{{C:\Python26\Scripts\tahoe create-client --basedir C:\tahoelafsbase}}}".  Choose an appropriate base directory.
    197 
    198 8. Run "{{{notepad C:\tahoelafsbase\tahoe.cfg}}}" to edit your config file. After "{{{introducer.furl = }}}", paste in the FURL of the introducer for the grid you want to connect to.  The test grid FURL is pb://todjw7qkb4dgq4fkeo7cqydcu5vneioh@tahoecs2.allmydata.com:52106/introducer .
    199 
    200 9. Run "{{{C:\Python26\Scripts\tahoe start --basedir C:\tahoelafsbase}}}". Your node will start running and connect to the grid. The Windows firewall may ask whether or not to allow python to make network connections. Say yes.
    201 
    202 === What if that doesn't work? ===
    203 
    204 If the build or install steps result in an error that says a compiler is needed, install the MinGW C/C++ compiler as follows:
    205 
    206 1. Download and install MinGW from  http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download. The installer will prompt you for what components to install. You need the base components plus g++.
    207 
    208 2. Configure distutils to use MinGW. To configure distutils to use mingw32, create a file called "distutils.cfg" in C:\Python26\lib\distutils, and put in that file:
    209 
    210 {{{
    211 [build]
    212 compiler=mingw32
    213 }}}
    214 
    215 3. Add the MinGW binary path to your Path variable. To do that, go to the control panel (classic view), and double-click "System". Click on the "Advanced" tab (for Vista, click the "Advanced system settings" link on the left and accept the elevation prompt), then click the "Environment Variables" button. Scroll down to the "Path" variable in the "System Variables" list, double-click it, append ";C:\MinGW\bin" to the path, and "OK" out of all the dialogs.  If you installed MinGW in some place other than C:\MinGW, adjust the path appropriately.
    216 
    217 After installing the compilers, repeat the above instructions from step 4 (using a new command prompt to make sure that the environment variable setting has taken effect).
    218 
    219 If you prefer to use Python 2.5, you must install a 2.5 build of pywin32 and also install OpenSSL or Tahoe-LAFS will fail to run with an error about being unable to find ssl.dll.  To install OpenSSL:
    220 
    221 1. Download and install the Visual Studio 2008 redistributables from  http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en. This is needed for OpenSSL.
    222 
    223 2. Download and install OpenSSL v.9.8k Light from  http://www.slproweb.com/products/Win32OpenSSL.html.
    224 
    225 === How do I make it run as a Windows service? ===
    226 
    227 http://agiletesting.blogspot.com/2005/09/running-python-script-as-windows.html
     1renamed to AdvancedInstall