installation.rst 4.9 KB

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