installation.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 Jessie / Ubuntu 14.04 installation preparations (git)
  33. ------------------------------------------------------------
  34. Some of the steps detailled below might be useful also for non-git installs.
  35. .. parsed-literal::
  36. # Python 3.x (>= 3.2) + Headers, Py Package Installer, VirtualEnv
  37. apt-get install python3 python3-dev python3-pip python-virtualenv
  38. # we need OpenSSL + Headers for Crypto
  39. apt-get install libssl-dev openssl
  40. # ACL support Headers + Library
  41. apt-get install libacl1-dev libacl1
  42. # lz4 super fast compression support Headers + Library
  43. apt-get install liblz4-dev liblz4-1
  44. # if you do not have gcc / make / etc. yet
  45. apt-get install build-essential
  46. # optional: FUSE support - to mount backup archives
  47. # in case you get complaints about permission denied on /etc/fuse.conf:
  48. # on ubuntu this means your user is not in the "fuse" group. just add
  49. # yourself there, log out and log in again.
  50. apt-get install libfuse-dev fuse
  51. # optional: for unit testing
  52. apt-get install fakeroot
  53. Korora / Fedora 21 installation preparations (git)
  54. --------------------------------------------------
  55. Some of the steps detailled below might be useful also for non-git installs.
  56. .. parsed-literal::
  57. # Python 3.x (>= 3.2) + Headers, Py Package Installer, VirtualEnv
  58. sudo dnf install python3 python3-devel python3-pip python3-virtualenv
  59. # we need OpenSSL + Headers for Crypto
  60. sudo dnf install openssl-devel openssl
  61. # ACL support Headers + Library
  62. sudo dnf install libacl-devel libacl
  63. # lz4 super fast compression support Headers + Library
  64. sudo dnf install lz4-devel
  65. # optional: FUSE support - to mount backup archives
  66. sudo dnf install fuse-devel fuse
  67. # optional: for unit testing
  68. sudo dnf install fakeroot
  69. Cygwin installation preparations (git)
  70. --------------------------------------
  71. Please note that running under cygwin is rather experimental, stuff has been
  72. tested with CygWin (x86-64) v2.1.0.
  73. You'll need at least (use the cygwin installer to fetch/install these):
  74. ::
  75. python3
  76. python3-setuptools
  77. python3-cython
  78. binutils
  79. gcc-core
  80. git
  81. libopenssl
  82. liblz4_1 liblz4-devel # from cygwinports.org
  83. make
  84. openssh
  85. openssl-devel
  86. You can then install ``pip`` and ``virtualenv``:
  87. ::
  88. easy_install-3.4 pip
  89. pip install virtualenv
  90. And now continue with the generic installation (see below).
  91. In case that creation of the virtual env fails, try deleting this file:
  92. ::
  93. /usr/lib/python3.4/__pycache__/platform.cpython-34.pyc
  94. Generic: Installing borgbackup (git)
  95. ------------------------------------
  96. After you have done the installation preparations, you can now fetch and build
  97. |project_name|.
  98. Note: this uses latest, unreleased development code from git.
  99. While we try not to break master, there are no guarantees on anything.
  100. .. parsed-literal::
  101. # get |project_name| from github, install it
  102. git clone |git_url|
  103. virtualenv --python=python3 borg-env
  104. source borg-env/bin/activate # always before using!
  105. # install borg + dependencies into virtualenv
  106. pip install cython # compile .pyx -> .c
  107. pip install tox pytest # optional, for running unit tests
  108. pip install sphinx # optional, to build the docs
  109. pip install llfuse # optional, for FUSE support
  110. cd borg
  111. pip install -e . # in-place editable mode
  112. # optional: run all the tests, on all supported Python versions
  113. fakeroot -u tox