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: lowlevel FUSE py binding - 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. # if it complains about not being able to find llfuse: make a symlink
  53. # borg-env/lib/python3.4/site-packages/llfuse -> /usr/lib/python3/dist-packages/llfuse
  54. apt-get install python3-llfuse fuse
  55. # optional: for unit testing
  56. apt-get install fakeroot
  57. # get |project_name| from github, install it
  58. git clone |git_url|
  59. apt-get install python-virtualenv
  60. virtualenv --python=python3 borg-env
  61. source borg-env/bin/activate # always before using!
  62. # install borg + dependencies into virtualenv
  63. pip install cython # compile .pyx -> .c
  64. pip install tox pytest # optional, for running unit tests
  65. pip install sphinx # optional, to build the docs
  66. cd borg
  67. pip install -e . # in-place editable mode
  68. # optional: run all the tests, on all supported Python versions
  69. fakeroot -u tox
  70. Korora / Fedora 21 installation (from git)
  71. ------------------------------------------
  72. Note: this uses latest, unreleased development code from git.
  73. While we try not to break master, there are no guarantees on anything.
  74. Some of the steps detailled below might be useful also for non-git installs.
  75. .. parsed-literal::
  76. # Python 3.x (>= 3.2) + Headers, Py Package Installer
  77. sudo dnf install python3 python3-devel python3-pip
  78. # we need OpenSSL + Headers for Crypto
  79. sudo dnf install openssl-devel openssl
  80. # ACL support Headers + Library
  81. sudo dnf install libacl-devel libacl
  82. # lz4 super fast compression support Headers + Library
  83. sudo dnf install lz4
  84. # optional: lowlevel FUSE py binding - to mount backup archives
  85. sudo dnf install python3-llfuse fuse
  86. # optional: for unit testing
  87. sudo dnf install fakeroot
  88. # get |project_name| from github, install it
  89. git clone |git_url|
  90. dnf install python3-virtualenv
  91. virtualenv --python=python3 borg-env
  92. source borg-env/bin/activate # always before using!
  93. # install borg + dependencies into virtualenv
  94. pip install cython # compile .pyx -> .c
  95. pip install tox pytest # optional, for running unit tests
  96. pip install sphinx # optional, to build the docs
  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