Linux under the commonly used three kinds of software installation -rpm, yum, tar

 

A: Linux source installation
    1, extract the source package file
    source packages often use tar archiving tool and then use gunzip or bzip2 compressed format suffix will respectively .tar.gz and .tar.bz2, respectively, to relieve stress:
    tar -zxvf filename.tar.gz
    the tar -jxvf filename.tar.bz2

        the tar file compression or decompression of the tar [parameters] [file]
            -C archive
            -x extracting file
            -t see which documents in the compressed packet
            -z Gzip compression or with decompression
            -j bzip2 compression or decompression with a
            display process of compressing or decompressing information -v
            -f target file name
            -P preserve the original permissions and attributes
            -p absolute path compression
            -C extracted to the specified directory

    2, change to the directory unpacked
    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 relies on libraries, compilers,
    Assembler, linker checks, etc., 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 executable files, source code files, help files in the file system position. 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
    to run a script to configure the detection environment to generate information corresponding to the installation.

    
Two: RPM package installed
    
    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: Displays detailed information package
    -i <package> or --install <package>: Install specific software packages 
    -l: displays a list of files 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 : RPM package lists the description of [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: remove package
    --force forcibly remove the like as the forced operation;
    --requires show the dependency package;
    --nodeps ignore dependencies and continue
    
    1, mounted
    rpm -i package files to install
    rpm -iv package files need to be installed (display installation details)
    rpm -ivh package you need to install (installation details and show progress)

    2, upgrade
    rpm -U package files need to upgrade
    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 other programs that rely on the package, the system will prompt can not be deleted, if necessary forcibly removed plus --nodeps, 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 the software

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

    6, viewing dependencies
        yum deplist software
    
    7, view the software installed
        yum list installded
    
    yum list of command parameters:
        -e performed silently
          -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 the document)
          Clean Clear rpm headers header
          clean oldheaders purges old header rpm
          deplist listed package dependencies
          list update and install the RPM package
          list installed has installation package
          list extras not been installed in the package repository
          RPM package information and install the update info
          info information (parameter -qa similar) installed package installed
          the install [RPM package] installation package
          RPM package installed locally localinstall
          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 display configuration repository
          resolvedep specified dependency
          remove [RPM package] uninstall package

A: Linux source installation
    1, extract the source package file
    source packages often use tar archiving tool and then use gunzip or bzip2 compressed format suffix will respectively .tar.gz and .tar.bz2, respectively, to relieve stress:
    tar -zxvf filename.tar.gz
    the tar -jxvf filename.tar.bz2

        the tar file compression or decompression of the tar [parameters] [file]
            -C archive
            -x extracting file
            -t see which documents in the compressed packet
            -z Gzip compression or with decompression
            -j bzip2 compression or decompression with a
            display process of compressing or decompressing information -v
            -f target file name
            -P preserve the original permissions and attributes
            -p absolute path compression
            -C extracted to the specified directory

    2, change to the directory unpacked
    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 relies on libraries, compilers,
    Assembler, linker checks, etc., 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 executable files, source code files, help files in the file system position. 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
    to run a script to configure the detection environment to generate information corresponding to the installation.

    
Two: RPM package installed
    
    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: Displays detailed information package
    -i <package> or --install <package>: Install specific software packages 
    -l: displays a list of files 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 : RPM package lists the description of [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: remove package
    --force forcibly remove the like as the forced operation;
    --requires show the dependency package;
    --nodeps ignore dependencies and continue
    
    1, mounted
    rpm -i package files to install
    rpm -iv package files need to be installed (display installation details)
    rpm -ivh package you need to install (installation details and show progress)

    2, upgrade
    rpm -U package files need to upgrade
    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 other programs that rely on the package, the system will prompt can not be deleted, if necessary forcibly removed plus --nodeps, 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 the software

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

    6, viewing dependencies
        yum deplist software
    
    7, view the software installed
        yum list installded
    
    yum list of command parameters:
        -e performed silently
          -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 the document)
          Clean Clear rpm headers header
          clean oldheaders purges old header rpm
          deplist listed package dependencies
          list update and install the RPM package
          list installed has installation package
          list extras not been installed in the package repository
          RPM package information and install the update info
          info information (parameter -qa similar) installed package installed
          the install [RPM package] installation package
          RPM package installed locally localinstall
          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 display configuration repository
          resolvedep specified dependency
          remove [RPM package] uninstall package

Guess you like

Origin www.cnblogs.com/zhaoyanhaoBlog/p/12118167.html