Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c5c754

Browse files
authored
doc: Updating and refining build instructions
This commit partly fixes issue #831 from LizardFS repository (github.com/lizardfs/lizardfs/issues/831)
1 parent a435d4e commit 0c5c754

File tree

1 file changed

+31
-22
lines changed

1 file changed

+31
-22
lines changed

source/devguide/obtaining.rst

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,58 @@
11
.. _obtaining_source:
22

33
*********************************************
4-
Obtaining and installing LizardFS from Source
4+
Obtaining and installing LizardFS from source
55
*********************************************
66

77
.. auth-status-todo/none
88
99
Installing LizardFS from source
1010
+++++++++++++++++++++++++++++++
1111

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.
1713

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.
2021

2122
1. Create a build directory inside the source directory::
2223

23-
cd lizardfs-source
24+
cd lizardfs
2425
mkdir build
26+
cd build
2527

26-
2. Run ::
28+
2. Inside ``build`` directory run::
2729

2830
cmake ..
2931

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+
3634
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
3743

38-
3. Run make in the build directory::
44+
3. Run ``make`` in the build directory::
3945

4046
make
47+
48+
If you want to speed up your compilation, make use of multiple jobs running simultaneously::
49+
50+
make -j4
4151

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)::
4353

44-
make install
54+
sudo make install
4555

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.
4757

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

Comments
 (0)