Under Linux software installed in several ways (source installation, rpm installation, yum install)

First, the source installation

1, extract the source package file
    Source Package tar tools typically use the archive gunzip or bzip2 then compressed, and the suffix .tar.gz .tar.bz2 format will provide, respectively, decompression mode, respectively:
    tar -zxvf filename.tar.gz
    tar -jxvf fileName.tar.bz2

  tar file compression or decompression tar [parameters] [File]
            -C archive
            -x extracting file
            -t see which documents in the compressed packet
            -z Gzip compression or decompression with
            -j compression or decompression with bzip2
            -v display or compression decompression process information
            -f target filename
            -P preserve the original permissions and attributes
            -p compression using an absolute path
            directory specified unzipped -C


    2, switch to the unpacked directory
    cd the FileDirectory

    3, ready to compile work
    before starting the installation service, you need to configure script, the current system will automatically conduct a series of assessments, such as source files, software dependencies, compiler,
    assembler , connectors and the like check, if necessary, may be used to specify the installation path parameter -prefix program, and when the script checks the system environment to meet the requirements,
    it will generate a Makefile in the current directory.
    -prefix = ./configure / usr / local / Program

    . 4, the installer generates
    the step of generating the Makefile system environment will be stored dependencies installation rules, then according to need to use the command to make the Makefile provided
    using suitable rules of SHELL source code to compile all the dependencies, and then make a final command generates an executable installer.
    the make

    5, the installation service program
    if no -prefix parameter in the configure script stage, the program will generally be installed by default to / usr / local / bin directory.
    install the make
    
    6, clean up temporary files (optional):
    the make Clean

    7, uninstall the service program command (only need to perform)
    the make Uninstall

    8, review the installation information
        whereis command to locate an executable file, a source code file, location of the help file in the file system. These attributes should belong to the original code files, binary files, or help file.
        whereis [-bmsu] [BMS directory name -f] filename
        binary search section -b file.
        manual search section -m file.
        -s source part of the search for the file.
        -u no documentation files
        -B, -M, and -S flag can be used to change or limit the whereis command searches for the position. Since the program to run faster chdir subroutine used, so use -M, -S and -B flag directory list must be given the full path name; for example, they must be a / (slash) Start.
        Like -b and -B, but adds a directory to search. Change or limit the whereis command searches binaries position.
        -M Like -m, but adds a directory to search. Change or limit the whereis command searches for manual part of the position.
        -S and -s the same, but adds a directory to search. Whereis command change or define the location of a search source.
        -f terminate the last -M, -S or -B directory list concurrent file name starting position signal.

    Source package installation installs slower than RPM packages, because RPM packages are designated according to specific systems and platforms, often a program that will provide a lot of RPM package
    format, users select the appropriate RPM packages according to the system installed directly, corresponds to the general-purpose source package, may be a plurality of systems, it is necessary
    Run script to configure the detection environment to generate information corresponding to the installation.


Two: RPM package installation

rpm is a very useful package manager, can be used to generate, install, query, verify, update, and uninstall individual software packages. a package usually includes a document file and information about the package, such as name, version, description, and so on.

    rpm [options] [parameters]
    -a: query all the packages
    -e: delete the specified package
    -f <file>: query suite has a specified file;
    -h or --hash: displays progress information
    -i: show package For more information
    -i <package> or --install <package>: install specific software packages
    -l: displays a list of files the package
    -p: query specified RPM package
    -q: use inquiry mode
    -U <package> or --upgrade <package>: upgrade the specified package
    -v: display instruction execution;
    -vv: instruction execution process is shown in detail, to facilitate troubleshooting.

    A combination of frequently used commands:
    -ivh: installation displays the installation progress --install - verbose - hash
    -Uvh: Upgrade Package --update;
    -qpl: File information [Query Package list] in the RPM package;
    -qpi : description information listed RPM package [Query package Penalty for install package Penalty for (S)];
    -qf: find out which RPM package [Query file] specify the file belongs to;
    -Va: check all of the RPM packages, find lost files [View Lost];
    -e: Delete package
    --force Force operations such as mandatory deletion;
    --requires show dependencies of the package;
    - nodeps ignored dependence relationship and continue
    
    1, install
    rpm -i to install the package file
    package file rpm -iv need to be installed (display installation details)
    RPM -ivh package you need to install (installation details and show progress)

    2, upgrade
    rpm -U needs the upgrade package file
    rpm -Uvh package files need to be upgraded (upgrade details and show progress)

    3, uninstall
    rpm -e need to uninstall packages
    NOTE: If you want to uninstall the program depends on the package, the system will prompt can not be deleted, if necessary by force delete plus --nodeps, it will force the removal, but may lead to
    rely on its software will not run.
    
    4, view the installed
        RPM -qa
    
    5, check the specified package
        rpm -qa | grep "or software package name,"

three, yum install
    1 install
        yum install software

    2, upgrade
        yum update Software

    3, delete
        yum remove software
    
    4. Check
        yum info software
    
    5, search software
        yum search software

    6, viewing dependencies
        yum deplist software
    
    7, the software has been installed to view the
        List installded yum
    
    yum command parameter list:
        -e silently execute
          -t ignore errors
          - R & lt [min] set wait time
          -y automatic answer Yes
          --skip-Broken ignore dependencies
          --nogpgcheck ignored GPG verification

        check-update update package check can
          clean all Clear all
          clean packages remove the temporary package file (/ var / cache / yum next file)
          Clean headers clear the header file rpm
          clean oldheaders rpm clear out old header files
          deplist lists package dependencies
          list update and install the RPM package
          list installed installed package
          list extras not been installed in the package repository
          may be installed and the update info RPM package information
          info packet Installed Installed (-qa similar parameters)
          the install [ RPM package] installation package
          localinstall local installation of the RPM package
          update [RPM package] update package
          upgrade to upgrade the system
          search [keyword] Search package
          provides [keyword] search for a specific package file name
          reinstall [RPM package] to reinstall the package
          repolist displays the repository configuration
          resolvedep specified dependency
          remove [RPM packages] unload package

. 1, yum installation can be seen from the way the network line installation, yum install only the software name, the system automatically based on the configuration file source yum mirror location to download and install the package, and the required software to automatically analyze dependencies, automatically installs the required dependent packages. This method is suitable for beginners, easy, regardless of dependencies. However, some software can not be installed via yum.

2, while the source installation way is to go online to download the source code needs its own package, and then extract the installation. This way you can specify the configuration parameters, more flexible and convenient, compatibility stronger. More suitable for Linux systems have more understanding of advanced users.

3, rpm is installed rpm packages exist locally, if there is also need to install depend on if a rpm is modified to compile their own, then the only installed with rpm

Reprinted: https://www.cnblogs.com/zcsj/p/7975869.html

Guess you like

Origin blog.csdn.net/qq_43210641/article/details/90269442