11# Building GlusterFS
2+
23This page describes how to build and install GlusterFS.
34
4- Build Requirements
5- ------------------
5+ ## Build Requirements
66
77The following packages are required for building GlusterFS,
88
9- - GNU Autotools
10- - Automake
11- - Autoconf
12- - Libtool
13- - lex (generally flex)
14- - GNU Bison
15- - OpenSSL
16- - libxml2
17- - Python 2.x
18- - libaio
19- - libibverbs
20- - librdmacm
21- - readline
22- - lvm2
23- - glib2
24- - liburcu
25- - cmocka
26- - libacl
27- - sqlite
28- - fuse-devel
29- - liburing-devel
9+ - GNU Autotools
10+ - Automake
11+ - Autoconf
12+ - Libtool
13+ - lex (generally flex)
14+ - GNU Bison
15+ - OpenSSL
16+ - libxml2
17+ - Python 2.x
18+ - libaio
19+ - libibverbs
20+ - librdmacm
21+ - readline
22+ - lvm2
23+ - glib2
24+ - liburcu
25+ - cmocka
26+ - libacl
27+ - sqlite
28+ - fuse-devel
29+ - liburing-devel
3030
3131### Fedora
3232
3333The following dnf command installs all the build requirements for
3434Fedora,
3535
3636``` console
37- # dnf install automake autoconf libtool flex bison openssl-devel \
38- libxml2-devel python-devel libaio-devel libibverbs-devel \
39- librdmacm-devel readline-devel lvm2-devel glib2-devel \
40- userspace-rcu-devel libcmocka-devel libacl-devel sqlite-devel \
41- fuse-devel redhat-rpm-config rpcgen libtirpc-devel make \
42- libuuid-devel liburing-devel gperftools
37+ dnf install automake autoconf libtool flex bison openssl-devel \
38+ libxml2-devel python-devel libaio-devel libibverbs-devel \
39+ librdmacm-devel readline-devel lvm2-devel glib2-devel \
40+ userspace-rcu-devel libcmocka-devel libacl-devel sqlite-devel \
41+ fuse-devel redhat-rpm-config rpcgen libtirpc-devel make \
42+ libuuid-devel liburing-devel gperftools
4343```
4444
4545### Ubuntu
@@ -48,52 +48,54 @@ The following apt-get command will install all the build requirements on
4848Ubuntu,
4949
5050``` console
51- # sudo apt-get install make automake autoconf libtool flex bison \
52- pkg-config libssl-dev libxml2-dev python-dev libaio-dev \
53- libibverbs-dev librdmacm-dev libreadline-dev liblvm2-dev \
54- libglib2.0-dev liburcu-dev libcmocka-dev libsqlite3-dev \
55- libacl1-dev liburing-dev google-perftools
51+ sudo apt-get install make automake autoconf libtool flex bison \
52+ pkg-config libssl-dev libxml2-dev python-dev libaio-dev \
53+ libibverbs-dev librdmacm-dev libreadline-dev liblvm2-dev \
54+ libglib2.0-dev liburcu-dev libcmocka-dev libsqlite3-dev \
55+ libacl1-dev liburing-dev google-perftools
5656```
5757
5858### CentOS / Enterprise Linux v7
5959
6060The following yum command installs the build requirements for CentOS / Enterprise Linux 7,
6161
6262``` console
63- # yum install autoconf automake bison cmockery2-devel dos2unix flex \
64- fuse-devel glib2-devel libacl-devel libaio-devel libattr-devel \
65- libcurl-devel libibverbs-devel librdmacm-devel libtirpc-devel \
66- libtool libxml2-devel lvm2-devel make openssl-devel pkgconfig \
67- pyliblzma python-devel python-eventlet python-netifaces \
68- python-paste-deploy python-simplejson python-sphinx python-webob \
69- pyxattr readline-devel rpm-build sqlite-devel systemtap-sdt-devel \
70- tar userspace-rcu-devel
63+ yum install autoconf automake bison cmockery2-devel dos2unix flex \
64+ fuse-devel glib2-devel libacl-devel libaio-devel libattr-devel \
65+ libcurl-devel libibverbs-devel librdmacm-devel libtirpc-devel \
66+ libtool libxml2-devel lvm2-devel make openssl-devel pkgconfig \
67+ pyliblzma python-devel python-eventlet python-netifaces \
68+ python-paste-deploy python-simplejson python-sphinx python-webob \
69+ pyxattr readline-devel rpm-build sqlite-devel systemtap-sdt-devel \
70+ tar userspace-rcu-devel
7171```
72+
7273** Note: You will need to enable the CentOS SIG repos in order to install userspace-rcu-devel package** <br >
7374For details check https://wiki.centos.org/SpecialInterestGroup/Storage
7475
7576### Enable repositories for CentOS 8
77+
7678The following yum command enables needed repositories providing the build requirements for CentOS 8,
79+
7780``` console
78- # yum-config-manager --enable powertools --enable devel
81+ yum-config-manager --enable powertools --enable devel
7982```
8083
8184### CentOS / Enterprise Linux v8
8285
8386The following yum command installs the build requirements for CentOS / Enterprise Linux 8,
8487
8588``` console
86- # yum install autoconf automake bison dos2unix flex fuse-devel glib2-devel \
87- libacl-devel libaio-devel libattr-devel libcurl-devel libibverbs-devel \
88- librdmacm-devel libtirpc-devel libuuid-devel libtool libxml2-devel \
89- lvm2-devel make openssl-devel pkgconfig xz-devel python3-devel \
90- python3-netifaces python3-paste-deploy python3-simplejson python3-sphinx \
91- python3-webob python3-pyxattr readline-devel rpm-build sqlite-devel \
92- systemtap-sdt-devel tar userspace-rcu-devel rpcgen liburing-devel
89+ yum install autoconf automake bison dos2unix flex fuse-devel glib2-devel \
90+ libacl-devel libaio-devel libattr-devel libcurl-devel libibverbs-devel \
91+ librdmacm-devel libtirpc-devel libuuid-devel libtool libxml2-devel \
92+ lvm2-devel make openssl-devel pkgconfig xz-devel python3-devel \
93+ python3-netifaces python3-paste-deploy python3-simplejson python3-sphinx \
94+ python3-webob python3-pyxattr readline-devel rpm-build sqlite-devel \
95+ systemtap-sdt-devel tar userspace-rcu-devel rpcgen liburing-devel
9396```
94-
95- Building from Source
96- --------------------
97+
98+ ## Building from Source
9799
98100This section describes how to build GlusterFS from source. It is assumed
99101you have a copy of the GlusterFS source (either from a released tarball
@@ -108,20 +110,20 @@ process.
108110Run autogen to generate the configure script.
109111
110112``` console
111- # ./autogen.sh
113+ ./autogen.sh
112114```
113115
114116Once autogen completes successfully a configure script is generated. Run
115117the configure script to generate the makefiles.
116118
117119``` console
118- # ./configure
120+ ./configure
119121```
120122
121123For CentOS 7, use:
122124
123125``` console
124- # ./configure --without-libtirpc
126+ ./configure --without-libtirpc
125127```
126128
127129If the above build requirements have been installed, running the
@@ -162,47 +164,46 @@ During development it is good to enable a debug build. To do this run
162164configure with a '--enable-debug' flag.
163165
164166``` console
165- # ./configure --enable-debug
167+ ./configure --enable-debug
166168```
167169
168170Further configuration flags can be found by running configure with a
169171'--help' flag,
170172
171173``` console
172- # ./configure --help
174+ ./configure --help
173175```
174176
175177Please note to enable gNFS use the following flag
176178
177179``` console
178- # ./configure --enable-gnfs
180+ ./configure --enable-gnfs
179181```
180182
181183If you are looking at contributing by fixing some of the memory issues,
182184use ` --enable-asan ` option
183185
184186``` console
185- # ./configure --enable-asan
187+ ./configure --enable-asan
186188```
187189
188190The above option will build with ` -fsanitize=address -fno-omit-frame-pointer `
189191options and uses the libasan.so shared library, so that needs to be available.
190192
191-
192193` io_uring ` is introduced on Linux kernel version 5.1. GlusterFS also needs the user space liburing helper library.
193194If these are not available for your machine or if you wish to build GlusterFS without io_uring support,
194195use ` --disable-linux-io_uring ` option
195196
196197``` console
197- # ./configure --disable-linux-io_uring
198+ ./configure --disable-linux-io_uring
198199```
199200
200201### Building
201202
202203Once configured, GlusterFS can be built with a simple make command.
203204
204205``` console
205- # make
206+ make
206207```
207208
208209To speed up the build process on a multicore machine, add a '-jN' flag,
@@ -216,15 +217,14 @@ the appropriate option to configure. If installing into the default
216217prefix, you might need to use 'sudo' or 'su -c' to install.
217218
218219``` console
219- # sudo make install
220+ sudo make install
220221```
221222
222223NOTE: glusterfs can be installed on any target path. However, the
223224` mount.glusterfs ` script has to be in ` /sbin/mount.glusterfs ` for
224225mounting via command ` mount -t glusterfs ` to work. See -t section
225226in man 8 mount for more details.
226227
227-
228228### Running GlusterFS
229229
230230GlusterFS can be only run as root, so the following commands will need
@@ -237,15 +237,14 @@ will need to start glusterd manually. To manually start glusterd just
237237run,
238238
239239``` console
240- # systemctl daemon-reload
241- # systemctl start glusterd
240+ systemctl daemon-reload
241+ systemctl start glusterd
242242```
243243
244244This will start glusterd and fork it into the background as a daemon
245245process. You now run 'gluster' commands and make use of GlusterFS.
246246
247- Building packages
248- -----------------
247+ ## Building packages
249248
250249### Building RPMs
251250
@@ -255,14 +254,15 @@ from Source' section. After the configuration step, run the following
255254steps to build RPMs,
256255
257256``` console
258- # cd extras/LinuxRPM
259- # make glusterrpms
257+ cd extras/LinuxRPM
258+ make glusterrpms
260259```
261260
262261This will create rpms from the source in 'extras/LinuxRPM'. * (Note: You
263262will need to install the rpmbuild requirements including rpmbuild and
264263mock)* <br >
265264For CentOS / Enterprise Linux 8 the dependencies can be installed via:
265+
266266``` console
267- # yum install mock rpm-build selinux-policy-devel
267+ yum install mock rpm-build selinux-policy-devel
268268```
0 commit comments