Linux Commands and Scripts

How to Install Brotli from Github on AlmaLinux 8

In this article, we’ll show you how to install Brotli from Github on AlmaLinux 8.

Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. Brotli is a new compression method with a better compression ratio than Gzip.

Its source code is publicly hosted on Github. In this tutorial we shall install Brotli using source code from Github.

Install Brotli from Github on AlmaLinux 8

1. Keep the server up to date.

# dnf update -y

2. Install build tools and required packages.

# dnf install gcc make bc sed autoconf automake libtool git -y

3. Clone the Brotli repository.

# git clone https://github.com/google/brotli.git

Change current working directory.

# cd brotli

4. Create a manual page for Brotli commands.

# cp ~/brotli/docs/brotli.1 /usr/share/man/man1 && sudo gzip /usr/share/man/man1/brotli.1

5. Generate Autotools' configure file.

To generate Autotools' configure file, first run the ./bootstrap command.

# ./bootstrap

After the command above, you will have access to the usual C program build steps: configure, make and make install.

For help, run the ./configure --help command.

6. Install Brotli

Run following command to install Brotli.

# ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib64/brotli --libdir=/usr/lib64/brotli --datarootdir=/usr/share --mandir=/usr/share/man/man1 --docdir=/usr/share/doc
# make
# make install

Verify the installation.

# brotli --version
brotli 1.0.9

That’s it. The installation has been successfully completed.

In this tutorial we have seen how to install Brotli from Github on AlmaLinux 8.

Looking for the dedicated servers? Visit our 10Gbps dedicated server page.

Related Articles