|
1 | 1 | .. _obtaining_source: |
2 | 2 |
|
3 | 3 | ********************************************* |
4 | | -Obtaining and installing LizardFS from Source |
| 4 | +Obtaining and installing LizardFS from source |
5 | 5 | ********************************************* |
6 | 6 |
|
7 | 7 | .. auth-status-todo/none |
8 | 8 |
|
9 | 9 | Installing LizardFS from source |
10 | 10 | +++++++++++++++++++++++++++++++ |
11 | 11 |
|
12 | | -The current LizardFS source code can be obtained from our :ref:`github` |
13 | | -(https://github.com/lizardfs/lizardfs) project page. |
14 | | -You can either download a tar ball from there by choosing the respective |
15 | | -version in the **Branch** tab on the left or use :ref:`git` to clone the |
16 | | -source tree. |
| 12 | +The current LizardFS source code can be obtained from our :ref:`GitHub` `project page<https://github.com/lizardfs/lizardfs>`_. You can either download a ``zip`` archive by choosing the respective version in the ``Branch`` tab or use :ref:`git` to clone the source tree. |
17 | 13 |
|
18 | | -LizardFS uses :ref:`CMake` as its build system. To compile the sources, follow |
19 | | -the directions outlined below. |
| 14 | +LizardFS uses :ref:`CMake` as its build system. To compile the sources, follow the directions outlined below. |
| 15 | + |
| 16 | +0. Install all required dependencies. For Ubuntu or Debian run:: |
| 17 | + |
| 18 | + apt install git cmake g++ libspdlog-dev libfuse3-dev libfuse-dev fuse isal libisal-dev libboost-all-dev asciidoc-base zlib1g-dev pkg-config libthrift-dev libcrcutil-dev libjudy-dev libpam0g-dev libdb-dev libgtest-dev |
| 19 | + |
| 20 | + Note that packages' names may vary on different Linux distributions. |
20 | 21 |
|
21 | 22 | 1. Create a build directory inside the source directory:: |
22 | 23 |
|
23 | | - cd lizardfs-source |
| 24 | + cd lizardfs |
24 | 25 | mkdir build |
| 26 | + cd build |
25 | 27 |
|
26 | | -2. Run :: |
| 28 | +2. Inside ``build`` directory run:: |
27 | 29 |
|
28 | 30 | cmake .. |
29 | 31 |
|
30 | | - inside the build directory. Useful options include |
31 | | - -DCMAKE_INSTALL_PREFIX, -DCMAKE_BUILD_TYPE as well as various |
32 | | - LizardFS-specific "-DENABLE_<something_or_other>" options. Options are listed when |
33 | | - cmake is ran and can be changed by re-running cmake:: |
34 | | - |
35 | | - cd build |
| 32 | + Useful options include ``-DENABLE_TESTS``, ``-DCMAKE_INSTALL_PREFIX``, ``-DCMAKE_BUILD_TYPE`` as well as various LizardFS-specific ``-DENABLE_<something_or_other>`` options. Options are listed when CMake is ran and can be modified by re-running CMake:: |
| 33 | + |
36 | 34 | cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/lizardfs |
| 35 | + |
| 36 | + Alternatively you can list all available options by running:: |
| 37 | + |
| 38 | + cmake -LAH .. |
| 39 | + |
| 40 | + If you want to enable tests, run:: |
| 41 | + |
| 42 | + cmake .. -DENABLE_TESTS=ON |
37 | 43 |
|
38 | | -3. Run make in the build directory:: |
| 44 | +3. Run ``make`` in the build directory:: |
39 | 45 |
|
40 | 46 | make |
| 47 | + |
| 48 | + If you want to speed up your compilation, make use of multiple jobs running simultaneously:: |
| 49 | + |
| 50 | + make -j4 |
41 | 51 |
|
42 | | -4. Run make install to install files (you may need to be root):: |
| 52 | +4. Run ``make install`` to install files (you may need to be ``root`` user):: |
43 | 53 |
|
44 | | - make install |
| 54 | + sudo make install |
45 | 55 |
|
46 | | -Now you have a full installation of LizardFS from source code. |
| 56 | +Now you have a full installation of LizardFS compiled from source code. |
47 | 57 |
|
48 | | -For build instructions on operating systems other than Linux, please refer to |
49 | | -:ref:`workspace` . |
| 58 | +For build instructions on operating systems other than Linux, please refer to :ref:`workspace`. |
0 commit comments