How To Install Brotli Compression on Rocky Linux 8

In this guide, we want to teach you How To Install Brotli Compression on Rocky Linux 8.

Brotli is a state-of-the-art lossless compression format, supported by all major browsers. It is capable of achieving considerably better compression ratios than the ubiquitous gzip and is rapidly gaining in popularity. 

One of the more interesting features of the brotli file format, in the context of textual web content compression, is the inclusion of a built-in static dictionary. The dictionary is quite large, and in addition to containing various strings in multiple languages, it also supports the option to apply multiple transformations to those words, increasing its versatility.

Steps To Install Brotli Compression on Rocky Linux 8

To install Brotli, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with Rocky Linux 8.

Now follow the steps below to install Brotli from the source on Rocky Linux 8.

Install Brotli from source on Rocky Linux 8

First, you need to update your local package index with the following command:

sudo dnf update -y

Then, use the following command to install the required packages and dependencies for Brotli:

sudo dnf install -y wget gcc make bc sed autoconf automake libtool git tree

At this point, you need to clone the Brotli repository from GitHub with the following command:

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

Next, switch to your Brotli directory with the command below:

cd brotli

Now create a manual page for the Brotli command:

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

To generate the Autotools configure file, run the following command:

sudo ./bootstrap

Now you have access to the usual C program build steps: configuremake and make install available.

At this point, you can build and install Brotli on Rocky Linux 8 with the following commands:

# sudo ./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
# sudo make
# sudo make install

When you are finished, you can verify your Brotli installation on your server by checking its version:

brotli --version
Output
brotli 1.0.9

Also, you can use the following command to get more help about the brotli command:

brotli -h
Output
Usage: brotli [OPTION]… [FILE]…
Options:
-# compression level (0-9)
-c, --stdout write on standard output
-d, --decompress decompress
-f, --force force output file overwrite
-h, --help display this help and exit
-j, --rm remove source file(s)
-k, --keep keep source file(s) (default)
-n, --no-copy-stat do not copy source file(s) attributes
-o FILE, --output=FILE output file (only if 1 input file)
-q NUM, --quality=NUM compression level (0-11)
...

Conclusion

At this point, you learn to Install Brotli on Rocky Linux 8 from Source.

Hope you enjoy it.

You may be interested in these articles:

How To Change SSH port on Rocky Linux

Fix ‘semanage command’ Not Found Error on Rocky Linux

How To Configure Networking on Rocky Linux

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular