The source form of package management under Linux

Source: Internet
Author: User


The source code form of Linux package management
Package of past life:

when it comes to package management, it has to be mentioned that is the package is composed of what? That's how it's formed? A program is a program that is pre-processed, compiled, and then compiled into binary programs by a source code program, which is a program that is developed for specific hardware. Students with basic computer programming should know that the source code is compiled to invoke a specific library (library files), and these libraries, on different systems are different, such as Linux and Windows on the different, different distributions of Linux libraries are not the same, So this leads to the fact that the running environment of the binaries compiled on different kinds of systems is not the same, so the programs cannot run on different kinds of systems, which means they can only be run against a particular version of the system (this is something to keep in mind, as mentioned in the RPM Package Manager later).


Since it is the package management under Linux, I will use Linux as the basis for the description, the following content by default on the CentOS release. On CentOS, the binaries are generated, but what else is needed to make it run on top?


    • Library files are necessary to have, in the previous said, the program needs to run the corresponding library files, so this must have.

    • The program to run in a certain configuration, where is its configuration to put? The idea of everything in Linux is here, the configuration is placed in the file, called the configuration file, so the configuration file is essential.

    • The program is there, but how to use it? By the way, the help document must also have, usually Doc or man, with these help documents, and then a small white user who has not used the program before can look at the help document to use it.

    • Plus the binaries generated above

The above four points add up to form a package







Source Code Package version:

The source code of the program is archived into a. tar.gz or. tar.bz2 or. Tar.xz kind of document, such as a file of type bash-4.3.2.tar.gz, where


    • Bash called source code package name

    • 4 is the major version number

    • 3 is the minor version number

    • 2 is the hair model is also called the revision number







About open Source software:
Now open source is very popular, such as Java, MySQL, PHP, and so on, these open-source software in the development will rely on a lot of other open source software features, there will be a lot of dependencies between them, so a lot of open source software to the outside, usually in the form of source code published, so that, Users want to use this software to directly obtain the source code of the software, and then in their own environment through preprocessing, compilation, compilation and other forms of binary software, and then through a number of settings, library file settings, the settings of the header file Help document settings, etc., the program can be used normally, The following is the process of obtaining the program through the source code method.
The characteristics of the source code program form:
  • Compatibility is good, can be controlled very good, can be customized: Because the final binary program is compiled in their own environment, the library file certainly no problem, then the program will not be a problem to run

  • The operation is very complex, the compilation time is very long, very error-prone (This is why there is a Package manager rpm): Many steps, different source code needs different libraries, so it is very easy to error, not missing the library file, is missing the library file;


The following is the source form to install Nginx to show you the steps of the source installation:
Lab Environment:
  • The CentOS 6.6 (64bit) kernel is 2.6.32-504.el6.x86_64

  • Nginx-1.6.1.tar.gz



To compile and install the C source program:
  1. ./configure: Check the compilation environment and determine the compilation characteristics, installation path, etc. according to the specified options;

  2. Make: Call the required compiler to perform the compilation process according to the makefile configuration file definition;

  3. Make Install: Install Program


Operation Steps:

# Unzip the zip pack

[Email protected] ~]# Tar XF nginx-1.6.1.tar.gz

# go to the extracted directory

[Email protected] ~]# CD nginx-1.6.1

# perform the following command to see the parameters required to execute the./configure

#--prefix==path Setting Installation location

#--user=user Set the user who can start the program

#--group=group Set the group of users who can start this program

# You can also look at other parameters that need attention and see if you need to set the

[Email protected] nginx-1.6.1]#/configure--help


--HELP Print this message


--prefix=path Set Installation Prefix

--sbin-path=path set Nginx binary pathname

--conf-path=path Set nginx.conf pathname

--error-log-path=path Set error Log pathname

--pid-path=path Set Nginx.pid pathname

--lock-path=path Set Nginx.lock pathname


--user=user set non-privileged user for

Worker processes

--group=group set non-privileged Group for

Worker processes


--builddir=dir Set Build Directory


--with-rtsig_module Enable Rtsig module

--with-select_module Enable Select module

--without-select_module Disable Select module

--with-poll_module Enable poll module

--without-poll_module Disable Poll module









The source form of package management under 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.