Linux Package Management 04-compressed archive and source code compilation installation

Source: Internet
Author: User
Tags bz2 gz file

One, compression, decompression command

1. Compact format: GZ, bz2, XZ, zip, Z

2, compression algorithm: The algorithm is different, the compression ratio will be different;

3, the original compression command: Compress:filename. Z

Decompression: uncompress

4. Files compressed into. gz format (compressed files only)

A) Gzip/path/to/somefile: The original file is deleted when the compression is complete, such as: gzip/tmp/file*

-D: Decompression, equivalent to the gunzip command;

-#: Specify the compression ratio, the range is 1-9, the default is 6;

b) Gunzip: decompression;

Gunzip/path/to/somefile.gz: The original file will be deleted when the decompression is complete

c) Zcat/path/to/somefile.gz: To see the contents of a compressed text file without being under pressure;

5, compressed into. bz2 format files (compressed files only)

Compression tool with a greater compression ratio than gzip, using a format approximation

A) Bzip2/path/to/somefile: The original file will be deleted when the decompression is complete, such as: bzip2/tmp/file*

-D: Unzip, equivalent to the BUNZIP2 command

-#: 1-9, default is 6

-K: Keep the original file when compressing

b) bunzip2/path/to/somefile.bz2: decompression;

c) Bzcat: To see the contents of a compressed text file without being under pressure;

6, compressed into. xz format files (compressed files only)

A) Xz/path/to/somefile, such as: xz/tmp/file*

-D: Unzip, equivalent to the UNXZ command

-#: 1-9, default is 6

-K: Keep the original file when compressing

b) Unxz

Xzdec

c) Xzcat

II. Archive Commands

1. zip: Both archived and compressed tools

A) zip Filename.zip FILE1 FILE2 ...: The original file is not deleted after compression

b) Unzip Filename.zip decompression

2, Archive: archive, the archive itself does not mean that the compression

3. Tar: Archive uncompressed tool only, format is. tar

A)-C: Create an archive file

b)-F File.tar: Archive file to be manipulated

such as: TAR-CF Test.tar test*.txt

c)-X: Expand Archive

such as: Tar-xf Test.tar

d)--xattrs: Preserves extended attribute information for files when archiving

e)-T: Do not expand the archive and directly view which files are archived

such as: TAR-TF Test.tar

f)-ZCF: Archive and invoke gzip format compression, such as: TAR-ZCF FILE.tar.gz file*

-ZXF: Call gzip to unzip and expand Archive,-Z option to omit

g)-JCF: Archive and call bzip2 format compression

-JXF: Call bzip2 to extract and expand Archive,-J option omitted

h)-JCF: Archive and invoke XZ format compression

-JXF:

4. Cpio: Archive Tool

Third, the package of source code compilation and installation

1. Compile and install C + + program commands: ./configure (source program comes with)-->makefile.in-->makefile-->make->make install compiles the source code into binary, Makefile is the description, It's not from the source program.

a)./configure replace the makefile.in with makefile for make

b) autoconf help software developers generate configure scripts

c) Automake help software developers generate makefile.in

2, the installation needs to install the development environment beforehand:

Development Tools

Development Libraries

X Software Development The package group to be installed when the graphics environment is required

3. Compile and install the source program steps:

a)./configure

A1)--help: Get Help

A2)the process of compiling--strip=0|1 into binary generates a lot of information such as debug, this command can choose whether to keep this information, 1 to enable the retention;

A3)--prefix= Specify the software installation path, such as:--prefix=/usr/local/apache

Binary file path:/usr/local/apache/bin, may need to be added to the PATH environment variable to be read by the system

Library file:/usr/local/apache/lib, you may need to export the library file path, step:

1, the new file/etc/ld.so.conf.d/*.conf, and the current software library files in the same directory as the new file;

2, Ldconfig command, re-notify the system to read the library, ldocnfig-v view;

Header file:/usr/local/apache/include let the system read the header file steps:

1, Ln-sv/usr/local/apache/include/usr/include/apache

man page: Add in System profile/etc/man.config: Manpath/usr/local/apache/man; If you are just using the manual page for temporary use, You can use the man-m/usr/local/apache/man httpd command;

a4)--sysconfdir= Specify the installation path for the profile, if you do not specify a profile in the ETC directory of the installation path

b) Make

c) make install

4, most of the source programs are self-equipped with installation documentation:

INSTALL

Readme

Iv. Compile and install the Perl program command steps:

1. Perl makefile.pl

2. Make

3. Make install

Compile and install the C + + program instance

Install Axel Software:

1. Download Axel-2.4.tar.gz Source Package

2. Tar XF axel-2.4.tar.gz

3. CD axel-2.4

4. See how this software is installed: less README

5,./configure--help

6,./configure

7. Make (Use this command if you are installing development tools and development Libraries)

8. Make Install

9, Axel Command use: Axel Ftp://172.16.0.1/pub/isos/Ubuntu-11.04-desktop-i386.iso

Axel Command options:

-N # Specify how many threads to download at the same time

-o Specifies the download path

such as: Axel-n-O Ftp://IPADD

To install a mini-game:

1. Download airstrike-pre6a-src.tar.gz

2. Gzip XF airstrike-pre6a-src.tar.gz

3. CD AIRSTRIKE-PRE6A-SRC

4. Less INSTALL

5. Make

6, LS

7. CP Airstrike/usr/bin

8, airstrike

This article is from "Nick Liu's blog," Please make sure to keep this source http://zkhylt.blog.51cto.com/3638719/1426809

Related Article

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.