Brotli is a data format specification for data streams compressed with a specific combination of the general-purpose LZ77lossless compression algorithm, Huffman coding and 2nd order context modelling.
A compression algorithm developed by Google and works best for text compression. Brotli primarily used by web servers and content delivery networks to compress HTTP content, making internet websites load faster.
Brotli is a new compression method with a better compression ratio than Gzip.
In this installation guide we will install Brotli using source code from Github.
Install Brotli CentOS 8
Just follow the steps below:
- Update your server.
dnf update -y
- Install compilers and other required packages.
dnf install -y make gcc git bc automake autoconf libtool
- Clone the Brotli repo with git.
git clone https://github.com/google/brotli.git
- Change directory to brotli Then create a manual page for Brotli commands with running the following:
cp ~/brotli/docs/brotli.1 /usr/share/man/man1 && sudo gzip /usr/share/man/man1/brotli.1
- Generate Autotools file with running the bootstrap command.
- Install Brotli with running the following command:
./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
Note: With running the bootstrap command that we executed before the latest step, you will have access to the C program build, configure, make and make install.
- Complete the installation with these build commands as follow:
make make install
- Verify and make sure that Brotli has been installed successfully.
That’s it !!
We illustrated how to install Brotli from Github on CentOS 8.