GlusterFS can easily be installed via yum or dnf in CentOS, Red Hat or Fedora as it's readily available in the default yum repository. It could however be a slightly outdated version so you might want to install the newer versions as provided by the CentOS Storage Special Interest Group (SIG).

You can install and configure GlusterFS on CentOS, RHEL or Fedora using dnf or yum from the terminal.

Steps to install GlusterFS server on CentOS, RHEL or Fedora:

  1. Launch terminal.
  2. Check for available GlusterFS repositories (optional).

    $ sudo dnf search gluster [sudo] password for user:  Last metadata expiration check: 23:20:40 ago on Fri 07 May 2021 08:01:41 AM +08. =========================== Name & Summary Matched: gluster =========================== centos-release-gluster6.noarch : Gluster 6 packages from the CentOS Storage SIG                                : repository centos-release-gluster7.noarch : Gluster 7 packages from the CentOS Storage SIG                                : repository centos-release-gluster8.noarch : Gluster 8 packages from the CentOS Storage SIG                                : repository glusterfs-api.x86_64 : GlusterFS api library glusterfs-cli.x86_64 : GlusterFS CLI glusterfs-client-xlators.x86_64 : GlusterFS client-side translators glusterfs-libs.x86_64 : GlusterFS common libraries glusterfs-rdma.x86_64 : GlusterFS rdma support for ib-verbs libvirt-daemon-driver-storage-gluster.x86_64 : Storage driver plugin for gluster pcp-pmda-gluster.x86_64 : Performance Co-Pilot (PCP) metrics for the Gluster filesystem qemu-kvm-block-gluster.x86_64 : QEMU Gluster block driver ================================ Name Matched: gluster ================================ glusterfs.x86_64 : Distributed File System glusterfs-fuse.x86_64 : Fuse client

  3. Add latest GlusterFS repository to yum / dnf or choose your preferred version from the list (optional).

    $ sudo dnf install --assumeyes centos-release-gluster Last metadata expiration check: 23:22:15 ago on Fri 07 May 2021 08:01:41 AM +08. Dependencies resolved. =======================================================================================  Package                             Architecture Version           Repository    Size ======================================================================================= Installing:  centos-release-gluster8             noarch       1.0-1.el8         extras       9.3 k Installing dependencies:  centos-release-storage-common       noarch       2-2.el8           extras       9.4 k  Transaction Summary ======================================================================================= Install  2 Packages  Total download size: 19 k Installed size: 2.4 k ##### snipped

    This will install the CentOS Storage Special Interest Group (SIG) yum repository which provides the latest GlusterFS software packages.

  4. Install glusterfs server and related packages.

    $ sudo dnf install --assumeyes glusterfs glusterfs-server CentOS-8 - Gluster 8                                    92 kB/s |  50 kB     00:00     Package glusterfs-6.0-49.1.el8.x86_64 is already installed. Dependencies resolved. =======================================================================================  Package                      Arch       Version             Repository           Size ======================================================================================= Installing:  glusterfs-server             x86_64     8.4-1.el8           centos-gluster8     1.4 M Upgrading:  glusterfs                    x86_64     8.4-1.el8           centos-gluster8     689 k  glusterfs-cli                x86_64     8.4-1.el8           centos-gluster8     214 k  glusterfs-client-xlators     x86_64     8.4-1.el8           centos-gluster8     899 k Installing dependencies:  glusterfs-fuse               x86_64     8.4-1.el8           centos-gluster8     171 k  libgfapi0                    x86_64     8.4-1.el8           centos-gluster8     125 k      replacing  glusterfs-api.x86_64 6.0-49.1.el8  libgfchangelog0              x86_64     8.4-1.el8           centos-gluster8      67 k      replacing  glusterfs-libs.x86_64 6.0-49.1.el8  libgfrpc0                    x86_64     8.4-1.el8           centos-gluster8      89 k      replacing  glusterfs-libs.x86_64 6.0-49.1.el8  libgfxdr0                    x86_64     8.4-1.el8           centos-gluster8      61 k      replacing  glusterfs-libs.x86_64 6.0-49.1.el8  libglusterd0                 x86_64     8.4-1.el8           centos-gluster8      45 k      replacing  glusterfs-libs.x86_64 6.0-49.1.el8  libglusterfs0                x86_64     8.4-1.el8           centos-gluster8     350 k      replacing  glusterfs-libs.x86_64 6.0-49.1.el8  python3-pyxattr              x86_64     0.5.3-18.el8        centos-gluster8      35 k  Transaction Summary ======================================================================================= Install  9 Packages Upgrade  3 Packages  Total download size: 4.1 M ##### snipped

  5. Enable network access for glusterfs service.

    $ sudo firewall-cmd --zone=public --add-service=glusterfs --permanent success

    This will enable access to 5667/tcp and is similar to running the following command:

    $ sudo firewall-cmd --zone=public --add-port=5667/tcp --permanent 

  6. Reload firewall to activate changes.

    $ sudo firewall-cmd --reload success

  7. Configure automatic startup of glusterd service during boot.

    $ sudo systemctl enable glusterd

  8. Start glusterd service.

    $ sudo systemctl start glusterd 

  9. Start creating GlusterFS cluster.