Linux under binary package, source code package, RPM package

Source: Internet
Author: User

Reproduced in: http://www.cnblogs.com/cj2014/p/3728324.html

Linux under binary package, source code package, RPM package

Mainly available in three formats MySQL package: RPM format, binary format, source format: (Tar package, GZ compression)

RPM Format: libjpeg-devel-6b-33.x86_64.rpm #rpm格式很好区分,

Binary package: mysql-3.23.58-pc-linux-i686.tar.gz #二进制格式的包名字很长, version number, adaptation platform, suitable hardware type, etc., format:mysql-< version >-<os>-tar.gz

SOURCE package: php-5.2.14.tar.gz #而源码格式仅仅就是一个版本号的tar包. #cj installation differences: Unzip,./config, make, make, install

Source code is the code that the programmer writes,
Binary code is the code that the machine runs.
Source code must pass compile to become binary code.

There are two kinds of rpm: binary rpm and source rpm.
The former is well-programmed binary, and the installation is available.
The latter is not yet well-prepared source, need to rebuild after the installation

Source code mode and binary package are two forms of package. The binary package contains a program that has been compiled and can be run immediately. You only need to download and package (install) them later, you can use them immediately. The source code package contains the program's original program code, it needs to be compiled on your computer before you can run the program, so the time to install from the source code will be longer.

There is a command called file under Linux, because Linux does not judge the type of files by the suffix name. So in general, when it is unclear what type of document is, use the file command to judge.
File php-5.2.14.tar.gz
Php-5.2.14.tar.gz:gzip compressed data, was "Php-5.2.14.tar", from Unix, last modified:wed Jul 22:32:34, max com Pression
This php-5.2.14.tar.gz is obviously a gzip compressed package, such files are generally used with the tar zxvf command to unpack and then go to configure the installation, usually the installation method is called source code compilation installation.

File libjpeg-devel-6b-33.x86_64.rpm
libjpeg-devel-6b-33.x86_64.rpm:rpm V3 bin i386 libjpeg-devel-6b-33
This libjpeg-devel-6b-33.x86_64.rpm file is an RPM format package for the standard Redhat series release. Similar RPM packages can be installed in Rhel, CentOS, SUSE, and Oraclelinux in general. The standard installation method is RPM-IVH.

Basically, the Red Hat series Linux release installs the software in both ways. There are often mentioned Yum, in fact, by Yum automatically determine the dependence of the RPM package, and then all need to install the n rpm Unified download installation, in fact, the principle and the installation of RPM there is no essential difference.

Generally on the official Web download source package is to: tar.gz TAR.BZ2 end of, compiled by the general is the. RPM to end, the file extension under Linux does not have the actual meaning, do it just to make it easier for you to see what type of package then take the way to install and configure, of course, sometimes not from the file extension to see what type of package, because the file name can be arbitrary To modify the type of package that can be viewed using the file command.

The installation of the source code generally consists of 3 steps: configuration (Configure), compile (make), install (makes install).

Configure is an executable script that has many options for using commands under the source path to be installed./configure–help output A detailed list of options.

Where the--prefix option is the path of the configuration installation, if this option is not configured, the executable file is placed by default in/usr/local/bin after installation, the library file is placed by default in/usr/local/lib, and the configuration file is placed by default in/usr/local/etc. Other resource files are placed in the/usr/local/share, more messy.

If you configure--prefix, such as:

    1. . /configure--prefix=/usr/local/test

All resource files can be placed in the/usr/local/test path without clutter.

Another benefit of using the-PREFIX option is uninstalling the software or porting the software. When an installed software is no longer needed, simply remove the installation directory, you can uninstall the software cleanly; the porting software simply copies the entire directory to another machine (the same operating system).

Of course, to uninstall the program, you can also use the original make directory once made uninstall, but only if the make file specified uninstall.

Linux under binary package, source code package, RPM package

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.