Download, unzip, and install the. tar.gz file in Linux

Source: Internet
Author: User
Tags gz file custom name

First, send the unpacking package to the Linux server:

1. After downloading the. tar.gz file on the WinDOS, send it to Linux via the SFTP client such as WinSCP

2. Direct download via wget command in Linux

#wget [Options] []

wget Common parameters:

-B: Background download (default download to current directory)

-O: Save the downloaded file with a custom name. The downloaded file is named by default with the string following the "last"/"symbol", and we can rename it using "-O New file name".

-limit-rate: Speed limit download, such as wget--limit-rate=300k

Second, unzip the. tar.gz file:

The. tar.gz file can be decompressed using the tar command, which is unzipped to the current directory by default.

#tar [main option] [secondary option] [file name or directory name]

(in general, unzip the. tar.gz file with the-ZXVF option

If an error gzip:stdin:not in gzip format is present, it means that it is not gzip formatted and can be decompressed with the-XVF option)

Main option (required, and only one of them):

C: equivalent to packing.

X: Release the file from the archive file. Equivalent to unpacking.

T: List the contents of the archive and see what files are in it.

Secondary options (optional):

-Z: Do I need to compress or decompress with gzip? The general format is xx.tar.gz or XX. tgz

-j: Do I need to compress or decompress with bzip2? The general format is xx.tar.bz2

-V: Files are displayed during compression

-F: Use the file name (note: After-F to immediately follow the path or filename, can not be followed by other options)

-P: Use original file properties (attributes are not changed according to user)

Third, installation

First, use the CD command to move to the directory you just unzipped.

After that, enter the following three commands consecutively:

#./configure

#make

#make Install

Explain:

In the extracted folder there is an executable script called configure, which is used to check whether the system has the necessary libraries for compilation, and whether the version of the library meets the needs of the compilation and other system information required for installation. Prepare for the subsequent compilation work. Executes using the #./configure command.

After the check passes, the makefile file is generated for compilation. At this point, you can start compiling. compile with the #make command.

After a successful compilation, install it via #make installation.

After installation, you should clear the temporary files generated during compilation and the files generated during the configuration process. Type the following command:

#make Clean
#make Distclean

After that, you can delete the folder you just downloaded and unzip it.

Download, unzip, and install the. tar.gz file in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.