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