Changes between Initial Version and Version 1 of AdvancedInstall


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

renamed from InstallDetails

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedInstall

    v1 v1  
     1= Additional !Build/Install Documentation =
     2
     3Hopefully, the basic install docs in
     4[http://tahoe-lafs.org/source/tahoe-lafs/trunk/docs/install.html docs/install.html]
     5are enough for the most common use cases. This page provides additional
     6information for specific platforms.
     7
     8Please feel free to add sections to this page with anything you might learn
     9while building Tahoe-LAFS on other platforms. Information which may be useful in
     10the most general cases will be folded into docs/install.html .
     11
     12== Dependencies ==
     13
     14The 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
     16This 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
     20In 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
     24Tahoe-LAFS is happy to build and run in-place, from a source tree. It is not
     25necessary to install it (outside the source tree) before use, but if you'd
     26like to do so, please read the "Installing Outside The Source Tree" section
     27below.
     28
     29However, it does need to be "built" before running it in place. While Tahoe-LAFS
     30itself is pure-python and therefore does not require a distinct compile step,
     31the mechanics that make it easy to run-in-place do require a setup phase. In
     32addition, Tahoe-LAFS uses several third-party python libraries to work its magic,
     33many of which are unlikely to be just "lying around" and already installed.
     34Several of these use compiled C code, so they '''do''' require a compile
     35step.
     36
     37{{{python setup.py build}}} will download and build any third-party libraries that
     38are not already available on your system. It will also prepare the source
     39tree 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}}}
     42executable knows that it adds this directory to PYTHONPATH before it
     43does anything else.
     44
     45After building, you can run the source tree's {{{bin/tahoe}}} script to
     46create, configure, and use your new Tahoe-LAFS node. As long as {{{bin/tahoe}}} is
     47left inside the built source tree, it can be run from anywhere (even through a
     48symlink). So until you delete the source tree, you can
     49symlink {{{~/bin/tahoe}}} to your source tree's {{{bin/tahoe}}} and then use
     50it as you would any other system executable.
     51
     52== the "Desert Island" Build ==
     53
     54Tahoe-LAFS will download and install most of the libraries it requires when you
     55run "{{{python setup.py build}}}". You might want to pre-download these libraries: perhaps you
     56are about to get on an airplane, or you anticipate having poor network
     57connectivity, or you just don't like the idea of a so-called compile step
     58using the network (the download step uses !PyPI to figure out where to
     59download these libraries from, so you might be concerned that it or one of
     60the project web pages it references has been modified to point at something
     61malicious).
     62
     63This disconnected-build operation is supported in two ways. When building
     64from a darcs checkout, you can download the latest "tahoe-deps" bundle from
     65http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-deps.tar.gz . Unpack this in
     66your source tree, and the build process will grab any necessary libraries
     67from its {{{tahoe-deps/}}} directory instead of downloading them from the
     68internet. You can also unpack tahoe-deps into the parent directory to share
     69it between multiple trees.
     70
     71Alternatively, if you are building from a tarball (either a release tarball
     72from http://tahoe-lafs.org/source/tahoe-lafs/releases/ , or a continually-generated
     73current-trunk tarball from http://tahoe-lafs.org/source/tahoe-lafs/tarballs/ ), you
     74can simply download the -SUMO version of the tarball instead of the regular
     75one. The "SUMO" tarball includes the current tahoe-deps bundle pre-unpacked
     76in the source tree.
     77
     78The tahoe-deps bundle is updated every once in a while, as new versions of
     79the dependent libraries are released, or as Tahoe becomes dependent upon new
     80things. The http://tahoe-lafs.org/source/tahoe-lafs/deps/ directory contains
     81historical ones, but there should never be a reason to use anything but the
     82latest. The tahoe-deps bundle contains a README that has a version number.
     83
     84
     85== Installing Outside The Source Tree ==
     86
     87If you want to use Tahoe-LAFS without keeping the source tree around, you will
     88need 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
     93easy_install and setuptools installed, will download the latest release of
     94Tahoe-LAFS (and its dependencies, all found via PyPI), build everything, and
     95install it into the standard place for python libraries on your system. On
     96unix platforms this usually goes into {{{/usr/lib/python2.5/site-packages/}}}
     97and {{{/usr/bin/tahoe}}} .
     98
     99On Debian or Ubuntu linux systems, you can install pre-compiled packages by
     100adding the tahoe-lafs.org APT repository to your {{{/etc/apt/sources.list}}}
     101and installing the "allmydata-tahoe" package. See DownloadDebianPackages for
     102details.
     103
     104Windows users can use an installer, which also provides the
     105[http://allmydata.com AllMyData] backup client, and a SMB/winfuse -based
     106frontend. These installers can be downloaded from (TODO: they're built, but
     107where are they downloadable?).
     108
     109Mac users can use a .dmg file (also an installer?), which provides a simple
     110GUI app to launch the tahoe node. These can be downloaded from (TODO: same
     111problem).
     112
     113=== Installing From A Source Tree ===
     114
     115These commands will take the current source tree and install its contents
     116somewhere else on your system. This is the traditional meaning of "install".
     117
     118The "{{{setup.py install}}}" target will install Tahoe-LAFS (and its
     119dependencies) into the standard place for python libraries on your system: on
     120Unix platforms this usually goes into {{{/usr/lib/python2.5/site-packages/}}}
     121and {{{/usr/bin/tahoe}}} .
     122
     123The "{{{make install}}}" Makefile target is a wrapper around "{{{setup.py install}}}"
     124that uses {{{--single-version-externally-managed}}} to bypass the extra
     125checking that setuptools does. This allows "{{{make install}}}"  to work the same way as traditional unix
     126software (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
     132These commands will take the current source tree and create a single-file
     133installer (or some other form of binary distribution). The
     134installer-like-thing can then be moved to some other system and installed
     135there.
     136
     137The "{{{setup.py bdist_egg}}}" command will create a single-file .egg in the
     138{{{dist/}}} directory, which can be manually copied onto your PYTHONPATH
     139somewhere. The .egg will declare its dependencies, but will not include them:
     140you must arrange for them to be installed before the .egg will be usable.
     141
     142The "{{{make deb-PLATFORM-head}}}" target (i.e. {{{make deb-hardy-head}}})
     143will create a debian package with the current tree's Tahoe code. This .deb
     144file will be placed in the parent directory. The debian package will declare
     145dependencies on the other libraries that it needs (like foolscap and zfec),
     146but it will not include any code from them. The allmydata.org APT repository
     147(see DownloadDebianPackages for details) has packages for the dependencies
     148that aren't already in Debian proper.
     149
     150The "{{{make windows-exe}}}" and "{{{make windows-installer}}}" commands will
     151create a windows executable, and the corresponding installer.
     152
     153The "{{{make mac-exe}}}" and "{{{make mac-dist}}}" commands will create a
     154Macintosh OS-X executable and the corresponding installer (.dmg) file.
     155
     156== Platform-specific Notes ==
     157
     158=== !Debian/Ubuntu ===
     159
     160Tahoe-LAFS is primarily developed on !Debian/Ubuntu machines. You can either build
     161from source (as described by this page), or download pre-compiled debian
     162packages for several distributions. See the DownloadDebianPackages page for
     163details.
     164
     165=== CentOS 5.4 ===
     166
     167For installing in CentOS 5.4 you need this list of package:
     168
     169yum install gcc python-devel sqlite-devel gcc-c++ openssl-devel
     170
     171Installing for dependencies:
     172cpp 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
     178You 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
     182The 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
     1841. Download and install Python 2.6.2 from http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi.
     185
     1862. Download and install pywin32 from http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.6.exe/download.
     187
     1883. 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
     1904. Open a command prompt and cd to the top of the Tahoe-LAFS tree (e.g. {{{cd \tahoe-lafs}}}).
     191
     1925. 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
     1946. Run "{{{C:\Python26\python setup.py install}}}". Wait a bit until it stops working. Again, you may need a working network connection.
     195
     1967. Run "{{{C:\Python26\Scripts\tahoe create-client --basedir C:\tahoelafsbase}}}".  Choose an appropriate base directory.
     197
     1988. 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
     2009. 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
     204If the build or install steps result in an error that says a compiler is needed, install the MinGW C/C++ compiler as follows:
     205
     2061. 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
     2082. 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]
     212compiler=mingw32
     213}}}
     214
     2153. 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
     217After 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
     219If 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
     2211. 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
     2232. 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
     227http://agiletesting.blogspot.com/2005/09/running-python-script-as-windows.html