2014-09-25 16:47:19 +00:00
|
|
|
.. -*- coding: utf-8-with-signature-unix; fill-column: 77 -*-
|
2013-11-08 20:31:08 +00:00
|
|
|
|
2016-12-12 21:48:13 +00:00
|
|
|
..
|
|
|
|
note: if you aren't reading the rendered form of these docs at
|
|
|
|
http://tahoe-lafs.readthedocs.io/en/latest/ , then be aware that any
|
|
|
|
":doc:" links refer to other files in this docs/ directory
|
|
|
|
|
2016-03-30 07:55:21 +00:00
|
|
|
*********************
|
|
|
|
Installing Tahoe-LAFS
|
|
|
|
*********************
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2012-04-01 01:57:17 +00:00
|
|
|
Welcome to `the Tahoe-LAFS project`_, a secure, decentralized, fault-tolerant
|
2016-12-12 21:48:13 +00:00
|
|
|
storage system. See :doc:`about` for an overview of the architecture and
|
2016-03-26 18:50:44 +00:00
|
|
|
security properties of the system.
|
2012-04-01 01:57:17 +00:00
|
|
|
|
2017-04-07 14:25:51 +00:00
|
|
|
This procedure should work on Windows, Mac, illumos (previously OpenSolaris),
|
|
|
|
and too many flavors of Linux and of BSD to list.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
.. _the Tahoe-LAFS project: https://tahoe-lafs.org
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-26 02:25:55 +00:00
|
|
|
First: In Case Of Trouble
|
2016-03-26 21:13:23 +00:00
|
|
|
=========================
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-13 14:32:46 +00:00
|
|
|
In some cases these instructions may fail due to peculiarities of your
|
|
|
|
platform.
|
|
|
|
|
|
|
|
If the following instructions don't Just Work without any further effort on
|
|
|
|
your part, then please write to `the tahoe-dev mailing list`_ where friendly
|
|
|
|
hackers will help you out.
|
2012-04-01 01:57:17 +00:00
|
|
|
|
|
|
|
.. _the tahoe-dev mailing list: https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
Pre-Packaged Versions
|
2016-03-26 21:13:23 +00:00
|
|
|
=====================
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
You may not need to build Tahoe at all.
|
|
|
|
|
2016-12-12 21:48:13 +00:00
|
|
|
If you are on Windows, please see :doc:`windows` for platform-specific
|
2016-03-26 02:21:43 +00:00
|
|
|
instructions.
|
|
|
|
|
|
|
|
If you are on a Mac, you can either follow these instructions, or use the
|
2020-11-19 14:12:56 +00:00
|
|
|
pre-packaged bundle described in :doc:`OS-X`.
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
Many Linux distributions include Tahoe-LAFS packages. Debian and Ubuntu users
|
2016-03-26 18:50:44 +00:00
|
|
|
can ``apt-get install tahoe-lafs``. See `OSPackages`_ for other
|
2016-03-26 02:21:43 +00:00
|
|
|
platforms.
|
|
|
|
|
2016-03-26 18:50:44 +00:00
|
|
|
.. _OSPackages: https://tahoe-lafs.org/trac/tahoe-lafs/wiki/OSPackages
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
Preliminaries
|
2016-03-30 04:01:22 +00:00
|
|
|
=============
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
If you don't use a pre-packaged copy of Tahoe, you can build it yourself.
|
2020-11-19 14:12:56 +00:00
|
|
|
You'll need Python2.7, pip, and virtualenv.
|
|
|
|
Tahoe-LAFS depends on some libraries which require a C compiler to build.
|
|
|
|
However, for many platforms, PyPI hosts already-built packages of libraries.
|
|
|
|
|
|
|
|
If there is no already-built package for your platform,
|
|
|
|
you will need a C compiler,
|
|
|
|
the Python development headers,
|
|
|
|
and some libraries (libffi-dev and libssl-dev).
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
On a modern Debian/Ubuntu-derived distribution, this command will get you
|
|
|
|
everything you need::
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2017-06-06 09:26:11 +00:00
|
|
|
apt-get install build-essential python-dev libffi-dev libssl-dev libyaml-dev python-virtualenv
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
On OS-X, install pip and virtualenv as described below. If you want to
|
2020-11-19 14:12:56 +00:00
|
|
|
compile the dependencies yourself, you'll also need to install
|
2016-03-26 02:21:43 +00:00
|
|
|
Xcode and its command-line tools.
|
|
|
|
|
2019-06-24 18:25:58 +00:00
|
|
|
**Note** that Tahoe-LAFS depends on `openssl 1.1.1c` or greater.
|
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
Python 2.7
|
|
|
|
----------
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2012-04-01 01:57:17 +00:00
|
|
|
Check if you already have an adequate version of Python installed by running
|
2016-03-30 04:01:22 +00:00
|
|
|
``python -V``. The latest version of Python v2.7 is recommended, which is
|
|
|
|
2.7.11 as of this writing. Python v2.6.x and v3 do not work. On Windows, we
|
2016-03-26 02:21:43 +00:00
|
|
|
recommend the use of native Python v2.7, not Cygwin Python. If you don't have
|
|
|
|
one of these versions of Python installed, `download`_ and install the latest
|
|
|
|
version of Python v2.7. Make sure that the path to the installation directory
|
|
|
|
has no spaces in it (e.g. on Windows, do not install Python in the "Program
|
|
|
|
Files" directory)::
|
|
|
|
|
|
|
|
% python --version
|
|
|
|
Python 2.7.11
|
2012-04-01 01:57:17 +00:00
|
|
|
|
2014-09-25 17:16:23 +00:00
|
|
|
.. _download: https://www.python.org/downloads/
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
pip
|
|
|
|
---
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
Many Python installations already include ``pip``, but in case yours does
|
2016-03-30 04:01:22 +00:00
|
|
|
not, get it with the `pip install instructions`_::
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
% pip --version
|
2018-05-17 20:12:02 +00:00
|
|
|
pip 10.0.1 from ... (python 2.7)
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
.. _pip install instructions: https://pip.pypa.io/en/stable/installing/
|
|
|
|
|
|
|
|
virtualenv
|
|
|
|
----------
|
|
|
|
|
|
|
|
If you do not have an OS-provided copy of ``virtualenv``, install it with the
|
|
|
|
instructions from the `virtualenv documentation`_::
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
% virtualenv --version
|
2018-05-17 20:12:02 +00:00
|
|
|
15.1.0
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
.. _virtualenv documentation: https://virtualenv.pypa.io/en/latest/installation.html
|
|
|
|
|
|
|
|
C compiler and libraries
|
|
|
|
------------------------
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
Except on OS-X, where the Tahoe project hosts pre-compiled wheels for all
|
|
|
|
dependencies, you will need several C libraries installed before you can
|
|
|
|
build. You will also need the Python development headers, and a C compiler
|
|
|
|
(your python installation should know how to find these).
|
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
On Debian/Ubuntu-derived systems, the necessary packages are ``python-dev``,
|
|
|
|
``libffi-dev``, and ``libssl-dev``, and can be installed with ``apt-get``. On
|
|
|
|
RPM-based system (like Fedora) these may be named ``python-devel``, etc,
|
|
|
|
instead, and cam be installed with ``yum`` or ``rpm``.
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2019-06-24 18:25:58 +00:00
|
|
|
**Note** that Tahoe-LAFS depends on `openssl 1.1.1c` or greater.
|
|
|
|
|
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
Install the Latest Tahoe-LAFS Release
|
2016-03-30 04:01:22 +00:00
|
|
|
=====================================
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
We recommend creating a fresh virtualenv for your Tahoe-LAFS install, to
|
|
|
|
isolate it from any python packages that are already installed (and to
|
|
|
|
isolate the rest of your system from Tahoe's dependencies).
|
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
This example uses a virtualenv named ``venv``, but you can call it anything
|
|
|
|
you like. Many people prefer to keep all their virtualenvs in one place, like
|
|
|
|
``~/.local/venvs/`` or ``~/venvs/``.
|
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
It's usually a good idea to upgrade the virtualenv's ``pip`` and
|
|
|
|
``setuptools`` to their latest versions, with ``venv/bin/pip install -U pip
|
|
|
|
setuptools``. Many operating systems have an older version of ``virtualenv``,
|
|
|
|
which then includes older versions of pip and setuptools. Upgrading is easy,
|
|
|
|
and only affects the virtualenv: not the rest of your computer.
|
|
|
|
|
|
|
|
Then use the virtualenv's ``pip`` to install the latest Tahoe-LAFS release
|
|
|
|
from PyPI with ``venv/bin/pip install tahoe-lafs``. After installation, run
|
2016-03-26 21:13:23 +00:00
|
|
|
``venv/bin/tahoe --version`` to confirm the install was successful::
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% virtualenv venv
|
|
|
|
New python executable in ~/venv/bin/python2.7
|
2016-03-26 02:21:43 +00:00
|
|
|
Installing setuptools, pip, wheel...done.
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
% venv/bin/pip install -U pip setuptools
|
|
|
|
Downloading/unpacking pip from https://pypi.python.org/...
|
|
|
|
...
|
|
|
|
Successfully installed pip setuptools
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% venv/bin/pip install tahoe-lafs
|
2016-03-26 02:21:43 +00:00
|
|
|
Collecting tahoe-lafs
|
|
|
|
...
|
|
|
|
Installing collected packages: ...
|
|
|
|
Successfully installed ...
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% venv/bin/tahoe --version
|
2020-01-17 12:18:46 +00:00
|
|
|
tahoe-lafs: 1.14.0
|
2016-03-26 02:21:43 +00:00
|
|
|
foolscap: ...
|
|
|
|
|
2020-11-19 14:12:56 +00:00
|
|
|
%
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
Install From a Source Tarball
|
|
|
|
-----------------------------
|
|
|
|
|
2016-12-17 22:36:18 +00:00
|
|
|
You can also install directly from the source tarball URL::
|
2016-03-26 02:21:43 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% virtualenv venv
|
2016-12-17 22:36:18 +00:00
|
|
|
New python executable in ~/venv/bin/python2.7
|
2016-03-26 02:21:43 +00:00
|
|
|
Installing setuptools, pip, wheel...done.
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2020-01-17 12:18:46 +00:00
|
|
|
% venv/bin/pip install https://tahoe-lafs.org/downloads/tahoe-lafs-1.14.0.tar.bz2
|
|
|
|
Collecting https://tahoe-lafs.org/downloads/tahoe-lafs-1.14.0.tar.bz2
|
2016-03-26 02:21:43 +00:00
|
|
|
...
|
|
|
|
Installing collected packages: ...
|
|
|
|
Successfully installed ...
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% venv/bin/tahoe --version
|
2020-01-17 12:18:46 +00:00
|
|
|
tahoe-lafs: 1.14.0
|
2016-03-26 02:21:43 +00:00
|
|
|
...
|
|
|
|
|
2019-08-14 13:27:48 +00:00
|
|
|
Extras
|
|
|
|
------
|
|
|
|
|
|
|
|
Tahoe-LAFS provides some functionality only when explicitly requested at installation time.
|
|
|
|
It does this using the "extras" feature of setuptools.
|
|
|
|
You can request these extra features when running the ``pip install`` command like this::
|
|
|
|
|
2019-08-14 18:48:12 +00:00
|
|
|
% venv/bin/pip install tahoe-lafs[tor]
|
2019-08-14 13:27:48 +00:00
|
|
|
|
2019-08-14 18:48:12 +00:00
|
|
|
This example enables support for listening and connecting using Tor.
|
2019-08-14 13:27:48 +00:00
|
|
|
The Tahoe-LAFS documentation for specific features which require an explicit install-time step will mention the "extra" that must be requested.
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
Hacking On Tahoe-LAFS
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
To modify the Tahoe source code, you should get a git checkout, and install
|
2016-04-12 19:15:42 +00:00
|
|
|
with the ``--editable`` flag. You should also use the ``[test]`` extra to get
|
|
|
|
the additional libraries needed to run the unit tests::
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
% git clone https://github.com/tahoe-lafs/tahoe-lafs.git
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
% cd tahoe-lafs
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% virtualenv venv
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-04-12 19:15:42 +00:00
|
|
|
% venv/bin/pip install --editable .[test]
|
2016-03-30 04:01:22 +00:00
|
|
|
Obtaining file::~/tahoe-lafs
|
2016-03-26 02:21:43 +00:00
|
|
|
...
|
|
|
|
Successfully installed ...
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 21:13:23 +00:00
|
|
|
% venv/bin/tahoe --version
|
2020-01-17 12:18:46 +00:00
|
|
|
tahoe-lafs: 1.14.0.post34.dev0
|
2016-03-26 02:21:43 +00:00
|
|
|
...
|
|
|
|
|
|
|
|
This way, you won't have to re-run the ``pip install`` step each time you
|
|
|
|
modify the source code.
|
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
Running the ``tahoe`` executable
|
|
|
|
================================
|
2016-03-26 02:21:43 +00:00
|
|
|
|
|
|
|
The rest of the Tahoe-LAFS documentation assumes that you can run the
|
2016-03-26 21:13:23 +00:00
|
|
|
``tahoe`` executable that you just created. You have four basic options:
|
|
|
|
|
|
|
|
* Use the full path each time (e.g. ``~/venv/bin/tahoe``).
|
|
|
|
* "`Activate`_" the virtualenv with ``. venv/bin/activate``, to get a
|
|
|
|
subshell with a ``$PATH`` that includes the ``venv/bin/`` directory, then
|
|
|
|
you can just run ``tahoe``.
|
|
|
|
* Change your ``$PATH`` to include the ``venv/bin/`` directory, so you can
|
|
|
|
just run ``tahoe``.
|
|
|
|
* Symlink from ``~/bin/tahoe`` to the ``tahoe`` executable. Since ``~/bin``
|
|
|
|
is typically in your ``$PATH`` (at least if it exists when you log in),
|
|
|
|
this will let you just run ``tahoe``.
|
|
|
|
|
|
|
|
You might also find the `pipsi`_ tool convenient: ``pipsi install
|
|
|
|
tahoe-lafs`` will create a new virtualenv, install tahoe into it, then
|
|
|
|
symlink just the executable (into ``~/.local/bin/tahoe``). Then either add
|
|
|
|
``~/.local/bin/`` to your ``$PATH``, or make one last symlink into
|
|
|
|
``~/bin/tahoe``.
|
|
|
|
|
|
|
|
.. _Activate: https://virtualenv.pypa.io/en/latest/userguide.html#activate-script
|
2016-03-26 02:21:43 +00:00
|
|
|
.. _pipsi: https://pypi.python.org/pypi/pipsi/0.9
|
2012-04-01 01:57:17 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
Running the Self-Tests
|
2016-03-30 04:01:22 +00:00
|
|
|
======================
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
To run the self-tests from a source tree, you'll need ``tox`` installed. On a
|
|
|
|
Debian/Ubuntu system, use ``apt-get install tox``. You can also install it
|
2016-03-26 21:13:23 +00:00
|
|
|
into your tahoe-specific virtualenv with ``pip install tox``.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
Then just run ``tox``. This will create a new fresh virtualenv, install Tahoe
|
|
|
|
(from the source tree, including any changes you have made) and all its
|
2016-04-12 19:15:42 +00:00
|
|
|
dependencies (including testing-only dependencies) into the virtualenv, then
|
|
|
|
run the unit tests. This ensures that the tests are repeatable and match the
|
|
|
|
results of other users, unaffected by any other Python packages installed on
|
|
|
|
your machine. On a modern computer this will take 5-10 minutes, and should
|
|
|
|
result in a "all tests passed" mesage::
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
% tox
|
2016-03-26 21:13:23 +00:00
|
|
|
GLOB sdist-make: ~/tahoe-lafs/setup.py
|
|
|
|
py27 recreate: ~/tahoe-lafs/.tox/py27
|
2020-01-17 12:18:46 +00:00
|
|
|
py27 inst: ~/tahoe-lafs/.tox/dist/tahoe-lafs-1.14.0.post8.dev0.zip
|
2016-03-26 02:21:43 +00:00
|
|
|
py27 runtests: commands[0] | tahoe --version
|
|
|
|
py27 runtests: commands[1] | trial --rterrors allmydata
|
|
|
|
allmydata.test.test_auth
|
|
|
|
AccountFileCheckerKeyTests
|
|
|
|
test_authenticated ... [OK]
|
|
|
|
test_missing_signature ... [OK]
|
|
|
|
...
|
|
|
|
Ran 1186 tests in 423.179s
|
2020-11-19 14:12:56 +00:00
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
PASSED (skips=7, expectedFailures=3, successes=1176)
|
|
|
|
__________________________ summary ___________________________________
|
|
|
|
py27: commands succeeded
|
2020-09-27 16:40:36 +00:00
|
|
|
congratulations :)
|
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
Common Problems
|
2016-03-30 04:01:22 +00:00
|
|
|
===============
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2015-06-15 04:21:22 +00:00
|
|
|
If you see an error like ``fatal error: Python.h: No such file or directory``
|
|
|
|
while compiling the dependencies, you need the Python development headers. If
|
|
|
|
you are on a Debian or Ubuntu system, you can install them with ``sudo
|
|
|
|
apt-get install python-dev``. On RedHat/Fedora, install ``python-devel``.
|
|
|
|
|
2016-03-26 02:21:43 +00:00
|
|
|
Similar errors about ``openssl/crypto.h`` indicate that you are missing the
|
|
|
|
OpenSSL development headers (``libssl-dev``). Likewise ``ffi.h`` means you
|
|
|
|
need ``libffi-dev``.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2019-06-24 18:25:58 +00:00
|
|
|
**Note** that Tahoe-LAFS depends on `openssl 1.1.1c` or greater.
|
|
|
|
|
2012-09-14 02:10:12 +00:00
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
Using Tahoe-LAFS
|
|
|
|
================
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2016-03-30 04:01:22 +00:00
|
|
|
Now you are ready to deploy a decentralized filesystem. You will use the
|
|
|
|
``tahoe`` executable to create, configure, and launch your Tahoe-LAFS nodes.
|
2016-12-12 21:48:13 +00:00
|
|
|
See :doc:`running` for instructions on how to do that.
|