installation.rst 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. .. include:: global.rst.inc
  2. .. _installation:
  3. Installation
  4. ============
  5. |project_name| requires:
  6. * Python_ >= 3.2
  7. * OpenSSL_ >= 1.0.0
  8. * libacl_
  9. * liblz4_
  10. * some python dependencies, see install_requires in setup.py
  11. General notes
  12. -------------
  13. Even though Python 3 is not the default Python version on many systems, it is
  14. usually available as an optional install.
  15. Virtualenv_ can be used to build and install |project_name| without affecting
  16. the system Python or requiring root access.
  17. Important:
  18. if you install into a virtual environment, you need to activate
  19. the virtual env first (``source borg-env/bin/activate``).
  20. Alternatively, directly run ``borg-env/bin/borg`` (or symlink that into some
  21. directory that is in your PATH so you can just run ``borg``).
  22. The llfuse_ python package is also required if you wish to mount an
  23. archive as a FUSE filesystem. Only FUSE >= 2.8.0 can support llfuse.
  24. You only need Cython to compile the .pyx files to the respective .c files
  25. when using |project_name| code from git. For |project_name| releases, the .c
  26. files will be bundled, so you won't need Cython to install a release.
  27. Platform notes
  28. --------------
  29. FreeBSD: You may need to get a recent enough OpenSSL version from FreeBSD ports.
  30. Mac OS X: You may need to get a recent enough OpenSSL version from homebrew_.
  31. Mac OS X: You need OS X FUSE >= 3.0.
  32. Debian / Ubuntu installation (from git)
  33. ---------------------------------------
  34. Note: this uses latest, unreleased development code from git.
  35. While we try not to break master, there are no guarantees on anything.
  36. Some of the steps detailled below might be useful also for non-git installs.
  37. .. parsed-literal::
  38. # Python 3.x (>= 3.2) + Headers, Py Package Installer
  39. apt-get install python3 python3-dev python3-pip
  40. # we need OpenSSL + Headers for Crypto
  41. apt-get install libssl-dev openssl
  42. # ACL support Headers + Library
  43. apt-get install libacl1-dev libacl1
  44. # lz4 super fast compression support Headers + Library
  45. apt-get install liblz4-dev liblz4-1
  46. # if you do not have gcc / make / etc. yet
  47. apt-get install build-essential
  48. # optional: FUSE support - to mount backup archives
  49. # in case you get complaints about permission denied on /etc/fuse.conf:
  50. # on ubuntu this means your user is not in the "fuse" group. just add
  51. # yourself there, log out and log in again.
  52. apt-get install libfuse-dev fuse
  53. # optional: for unit testing
  54. apt-get install fakeroot
  55. # get |project_name| from github, install it
  56. git clone |git_url|
  57. apt-get install python-virtualenv
  58. virtualenv --python=python3 borg-env
  59. source borg-env/bin/activate # always before using!
  60. # install borg + dependencies into virtualenv
  61. pip install cython # compile .pyx -> .c
  62. pip install tox pytest # optional, for running unit tests
  63. pip install sphinx # optional, to build the docs
  64. pip install llfuse # optional, for FUSE support
  65. cd borg
  66. pip install -e . # in-place editable mode
  67. # optional: run all the tests, on all supported Python versions
  68. fakeroot -u tox
  69. Korora / Fedora 21 installation (from git)
  70. ------------------------------------------
  71. Note: this uses latest, unreleased development code from git.
  72. While we try not to break master, there are no guarantees on anything.
  73. Some of the steps detailled below might be useful also for non-git installs.
  74. .. parsed-literal::
  75. # Python 3.x (>= 3.2) + Headers, Py Package Installer
  76. sudo dnf install python3 python3-devel python3-pip
  77. # we need OpenSSL + Headers for Crypto
  78. sudo dnf install openssl-devel openssl
  79. # ACL support Headers + Library
  80. sudo dnf install libacl-devel libacl
  81. # lz4 super fast compression support Headers + Library
  82. sudo dnf install lz4
  83. # optional: FUSE support - to mount backup archives
  84. sudo dnf install fuse-devel fuse
  85. # optional: for unit testing
  86. sudo dnf install fakeroot
  87. # get |project_name| from github, install it
  88. git clone |git_url|
  89. dnf install python3-virtualenv
  90. virtualenv --python=python3 borg-env
  91. source borg-env/bin/activate # always before using!
  92. # install borg + dependencies into virtualenv
  93. pip install cython # compile .pyx -> .c
  94. pip install tox pytest # optional, for running unit tests
  95. pip install sphinx # optional, to build the docs
  96. pip install llfuse # optional, for FUSE support
  97. cd borg
  98. pip install -e . # in-place editable mode
  99. # optional: run all the tests, on all supported Python versions
  100. fakeroot -u tox
  101. Cygwin (from git)
  102. -----------------
  103. Please note that running under cygwin is rather experimental, stuff has been
  104. tested with CygWin (x86-64) v2.1.0.
  105. You'll need at least (use the cygwin installer to fetch/install these):
  106. ::
  107. python3
  108. python3-setuptools
  109. python3-cython
  110. binutils
  111. gcc-core
  112. git
  113. libopenssl
  114. liblz4_1 liblz4-devel # from cygwinports.org
  115. make
  116. openssh
  117. openssl-devel
  118. You can then install ``pip`` and ``virtualenv``:
  119. ::
  120. easy_install-3.4 pip
  121. pip install virtualenv
  122. And now continue as for Linux (see above).
  123. In case that creation of the virtual env fails, try deleting this file:
  124. ::
  125. /usr/lib/python3.4/__pycache__/platform.cpython-34.pyc