Kiến Thức Linux Tutorial

How to install Brotli from Source on Ubuntu 20.04

Brotli

Brotli, a compression algorithm, claims to be more effective at compressing web pages than its predecessor, GZIP, and to have shorter compression times. It is available at no cost, has widespread support across current web servers, and can be used by anyone.Brotli is a compression format that is widely supported by today’s web servers.

A pre-defined dictionary of frequently used words is one of the characteristics that helps Brotli improve its compression efficiency. Because the server and the client both have access to this dictionary, we can save some space.

Brotli and GZIP, two compression formats, both help reduce page size by compressing files. Faster page loads are the result of less files.

Before getting started 

# lsb_release -ds

Create a new time zone 

# sudo dpkg-reconfigure tzdata

Please update your system to the most recent version.

# sudo apt update

Create Brotli 

Get the necessary software and build tools installed.

# sudo apt install -y build-essential gcc make bc sed autoconf automake libtool git apt-transport-https tree

Get a copy of the Brotli repository.

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

Access the Brotli code repository.

# cd brotli

You should make a reference page for using Brotli commands.

[consoel]# sudo cp ~/brotli/docs/brotli.1 /usr/share/man/man1 && sudo gzip /usr/share/man/man1/brotli.1[/console]

Look in the user guide.

# man brotli

Execute the ./bootstrap command to create the Autotools configure file.

# ./bootstrap

Once you’ve run the preceding command, you’ll have access to the standard C programme construction stages, including configure, make, and make install.

Use the ./configure –help command for further information.

Now, make 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
# sudo make install

A successful build allows you to verify the version.

# brotli --version

Conclusion

By following these steps, you have successfully compiled Brotli from source on Ubuntu 20.04 LTS. Brotli provides an efficient compression algorithm that helps reduce file sizes and improve the performance of websites.  Hopefully, you have learned how to build Brotli from source on Ubuntu 20.04 LTS.

Add Comment

Click here to post a comment