how to use sudo command to install .tar.gz?

To install some file *.tar.gz, you basically would do:

  1. Open a console, and go to the directory where the file is
  2. Type: tar -zxvf file.tar.gz
  3. Read the file INSTALL and/or README to know if you need some dependencies.

Most of the times you only need to:

  1. type ./configure
  2. make
  3. sudo make install