installation.rst 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. .. include:: global.rst.inc
  2. .. _installation:
  3. Installation
  4. ============
  5. |project_name| pyinstaller binary installation requires:
  6. * Linux: glibc >= 2.13 (ok for most supported Linux releases)
  7. * MacOS X: 10.10 (unknown whether it works for older releases)
  8. * FreeBSD: 10.2 (unknown whether it works for older releases)
  9. |project_name| non-binary installation requires:
  10. * Python_ >= 3.2.2
  11. * OpenSSL_ >= 1.0.0
  12. * libacl_ (that pulls in libattr_ also)
  13. * liblz4_
  14. * some python dependencies, see install_requires in setup.py
  15. General notes
  16. -------------
  17. You need to do some platform specific preparation steps (to install libraries
  18. and tools) followed by the generic installation of |project_name| itself:
  19. Below, we describe different ways to install |project_name|.
  20. - **dist package** - easy and fast, needs a distribution and platform specific
  21. binary package (for your Linux/*BSD/OS X/... distribution).
  22. - **pyinstaller binary** - easy and fast, we provide a ready-to-use binary file
  23. that just works on the supported platforms
  24. - **pypi** - installing a source package from pypi needs more installation steps
  25. and will need a compiler, development headers, etc..
  26. - **git** - for developers and power users who want to have the latest code or
  27. use revision control (each release is tagged).
  28. **Python 3**: Even though this is not the default Python version on many systems,
  29. it is usually available as an optional install.
  30. Virtualenv_ can be used to build and install |project_name| without affecting
  31. the system Python or requiring root access.
  32. Important:
  33. If you install into a virtual environment, you need to **activate**
  34. the virtual env first (``source borg-env/bin/activate``).
  35. Alternatively, directly run ``borg-env/bin/borg`` (or symlink that into some
  36. directory that is in your PATH so you can just run ``borg``).
  37. Using a virtual environment is optional, but recommended except for the most
  38. simple use cases.
  39. The llfuse_ python package is also required if you wish to mount an
  40. archive as a FUSE filesystem. Only FUSE >= 2.8.0 can support llfuse.
  41. You only need **Cython** to compile the .pyx files to the respective .c files
  42. when using |project_name| code from git. For |project_name| releases, the .c
  43. files will be bundled, so you won't need Cython to install a release.
  44. Platform notes
  45. --------------
  46. FreeBSD: You may need to get a recent enough OpenSSL version from FreeBSD ports.
  47. Mac OS X: You may need to get a recent enough OpenSSL version from homebrew_.
  48. Mac OS X: You need OS X FUSE >= 3.0.
  49. Installation (dist package)
  50. ---------------------------
  51. Some Linux, BSD and OS X distributions might offer a ready-to-use
  52. `borgbackup` package (which can be easily installed in the usual way).
  53. As |project_name| is still relatively new, such a package might be not
  54. available for your system yet. Please ask package maintainers to build a
  55. package or, if you can package / submit it yourself, please help us with
  56. that!
  57. If a package is available, it might be interesting for you to check its version
  58. and compare that to our latest release and review the change log (see links on
  59. our web site).
  60. Installation (pyinstaller binary)
  61. ---------------------------------
  62. For some platforms we offer a ready-to-use standalone borg binary.
  63. It is supposed to work without requiring installation or preparations.
  64. Check https://github.com/borgbackup/borg/releases for available binaries.
  65. Debian Jessie / Ubuntu 14.04 preparations (git/pypi)
  66. ----------------------------------------------------
  67. .. parsed-literal::
  68. # Python 3.x (>= 3.2) + Headers, Py Package Installer, VirtualEnv
  69. apt-get install python3 python3-dev python3-pip python-virtualenv
  70. # we need OpenSSL + Headers for Crypto
  71. apt-get install libssl-dev openssl
  72. # ACL support Headers + Library
  73. apt-get install libacl1-dev libacl1
  74. # lz4 super fast compression support Headers + Library
  75. apt-get install liblz4-dev liblz4-1
  76. # if you do not have gcc / make / etc. yet
  77. apt-get install build-essential
  78. # optional: FUSE support - to mount backup archives
  79. # in case you get complaints about permission denied on /etc/fuse.conf:
  80. # on ubuntu this means your user is not in the "fuse" group. just add
  81. # yourself there, log out and log in again.
  82. apt-get install libfuse-dev fuse pkg-config
  83. # optional: for unit testing
  84. apt-get install fakeroot
  85. Korora / Fedora 21 preparations (git/pypi)
  86. ------------------------------------------
  87. .. parsed-literal::
  88. # Python 3.x (>= 3.2) + Headers, Py Package Installer, VirtualEnv
  89. sudo dnf install python3 python3-devel python3-pip python3-virtualenv
  90. # we need OpenSSL + Headers for Crypto
  91. sudo dnf install openssl-devel openssl
  92. # ACL support Headers + Library
  93. sudo dnf install libacl-devel libacl
  94. # lz4 super fast compression support Headers + Library
  95. sudo dnf install lz4-devel
  96. # optional: FUSE support - to mount backup archives
  97. sudo dnf install fuse-devel fuse pkgconfig
  98. # optional: for unit testing
  99. sudo dnf install fakeroot
  100. Cygwin preparations (git/pypi)
  101. ------------------------------
  102. Please note that running under cygwin is rather experimental, stuff has been
  103. tested with CygWin (x86-64) v2.1.0.
  104. You'll need at least (use the cygwin installer to fetch/install these):
  105. ::
  106. python3 python3-setuptools
  107. python3-cython # not needed for releases
  108. binutils gcc-core
  109. libopenssl openssl-devel
  110. liblz4_1 liblz4-devel # from cygwinports.org
  111. git make openssh
  112. You can then install ``pip`` and ``virtualenv``:
  113. ::
  114. easy_install-3.4 pip
  115. pip install virtualenv
  116. And now continue with the generic installation (see below).
  117. In case that creation of the virtual env fails, try deleting this file:
  118. ::
  119. /usr/lib/python3.4/__pycache__/platform.cpython-34.pyc
  120. Installation (pypi)
  121. -------------------
  122. This uses the latest (source package) release from PyPi.
  123. .. parsed-literal::
  124. virtualenv --python=python3 borg-env
  125. source borg-env/bin/activate # always before using!
  126. # install borg + dependencies into virtualenv
  127. pip install 'llfuse<0.41' # optional, for FUSE support
  128. # 0.41 and 0.41.1 have unicode issues at install time
  129. pip install borgbackup
  130. Note: we install into a virtual environment here, but this is not a requirement.
  131. Installation (git)
  132. ------------------
  133. This uses latest, unreleased development code from git.
  134. While we try not to break master, there are no guarantees on anything.
  135. .. parsed-literal::
  136. # get |project_name| from github, install it
  137. git clone |git_url|
  138. virtualenv --python=python3 borg-env
  139. source borg-env/bin/activate # always before using!
  140. # install borg + dependencies into virtualenv
  141. pip install sphinx # optional, to build the docs
  142. pip install 'llfuse<0.41' # optional, for FUSE support
  143. # 0.41 and 0.41.1 have unicode issues at install time
  144. cd borg
  145. pip install -r requirements.d/development.txt
  146. pip install -e . # in-place editable mode
  147. # optional: run all the tests, on all supported Python versions
  148. fakeroot -u tox
  149. Note: as a developer or power user, you always want to use a virtual environment.