Marco Education 11th Day, RPM, yum, source program installation

Source: Internet
Author: User
Tags gpg mysql query mysql view yum repolist

  1. 1. LDD Displays shared library dependencies (print shared libraries dependencies) to display the library files that the commands depend on. Example: Ldd/bin/ls

    2. Package Manager rpm (Redhat Package Manager) contains (database: (clearly specify the program name and version, dependencies between packages, functional descriptions, file installation path and check code), program composition list: (File list, ), Manager functions (package, install, uninstall, upgrade, checksum, database management)

  2. 1, RPM package naming format: name-version-relase.arch.rpm (Version:major (major Version). minor (minor version number). Release (release number), Release: program issue number is not related to the program source issue number , which is used only to identify revisions made to the RPM package differently.

    2. RPM Installation (-I installation,-v display installation,-H with # # # # # # # # # # # # # # # # # # # # # # # # # # # # # RPM-IVH lftp-4.0.9-1.el6.x86_64.rpm 、-- replacepkgs Reinstall,)

    3, RPM Uninstall (e-Uninstall (uninstall as long as you specify the program name can be an example: Rpm-e lftp),-U Upgrade Package Example: RPM-UVH lftp-4.1.9-1.el6.x86_64.rpm, if after the installation of modified program configuration file, Uninstall will not delete this file but rename save)

    4, RPM query (-Q query package is installed,-QA display all installed packages, RPM-QA |grep mysql query specifies installed packages, rpm-qi MySQL Query installer description information, rpm-ql MySQL view installer makefile, RPM- QC MySQL View setup profile, rpm-qd MySQL view installer's help documentation, RPM-Q--scripts lftp View setup related scripts (scripts are divided into 4 categories: Preinstall: Pre-installation scripts, Postinstall: Post-installation script, Preuninstall: Pre-uninstall script, Postuninstall: Back of the year), Rpm-qf/etc/fstab query the file is generated by that package, the package is not installed to query, in the above query conditions add P can be an example: RPM-QPL MYSQL-5.1.66-2.EL6_3.X86_64.RPM)

    5, RPM Check (-V to see if the file properties change after installation example: Rpm-v Vim-common result: S.5 .... T. C/ETC/VIMRC, which indicates that/ETC/VIMRC has changed. Change Description: s indicates file size changes, m permissions or file type changes, 5 indicates MD5 changes, D version number changes, l path changes, u user changes, G group changes, t time changes, p ability changes, if the bit attribute has not changed display as. Results. )

    6, RPM Check package source legitimacy and integrity, you must import the package author public key on the current system, RPM--import rpm-gpg-key-centos-6 the file is included in the CD, Rpm-qa gpg-pubkey* display the installed public key information, Rpm-qi Gpg-pubkey-name Displays the details of the public key, automatically checks the validity and completeness of the package at installation, and manually examines the rpm-k example: Rpm-k axis-1.2.1-7.2.el6.noarch.rpm

    7, RPM database Rebuild (RPM database directory:/var/lib/rpm/, initialize database rpm--initdb: If there is no library, you will create a new one; rebuild the database rpm--REBUILDDB: Direct rebuild, overwrite the original database)

  3. 1. Yum (Yellowdog Update Modifier), Yum for C/s architecture: Client-to-Server,yum Repository:yum warehouse (data (individual RPM packages), metadata (package name, version information, Packages and sub-packages related information, dependencies, packet grouping information), Createrepo: A tool for making Yum warehouse metadata.

    2, Yum client implementation steps. 1 Get warehouse metadata cached locally:/var/cache/yum,2 parse the metadata file, make decisions in conjunction with local installed programs, 3 download packages in the Yum repository according to decision cache locally, install

    3. Yum Repository: Base library: A package typically provided for the system installation image. Updates Library: Used to store update patches and program update packages before the next system release. Extra Library: Additional libraries. Epel Library: (Extra Packages for Enterprise Linux), Epel is Rhel's Fedora software repository.

    4. The parent directory of the Repodata directory in the Yum Warehouse server is a usable warehouse, in the format: (Ftp://server/path/to/repository, Http://server/path/to/repository, nfs:// Server/nfs_path, file:///path/to/repository), master profile vi/etc/yum.conf, multiple configuration information can be saved in the same file, the file name format is. Repo end, the directory structure is/etc/ Yum.reops.d/under

    5. *.repo file Format description ([repoid], name, whether enabled, Gpgcheck check package integrity, Gpgkey public key source, cost set the access priority of the library, the default is 1000 the smaller the first access).

    6, Yum repolist display warehouse related information,yum list all display all package information in the warehouse,Yum Info Display package related information,yum grouplist Display all package group information

    Yum groupinfo "group NAME" shows the packages contained in the package group,

    CENTOS6 on and development-related package groups (development Tools, Server Platform Development, Desktop Platform development)

    Yum clean all cache, yum check-update check for available upgrade packages

    Yum Install Package_name installer package, yum Reinstall reinstall Package, yum update upgrade package, Yum downgrade downgrade

    Yum Remove delete package, yum groupinstall group_name install package Group, Yum groupremove Uninstall package Group

  4. 1. The four variables available in the Yum configuration file:

    $releasever: System major Version number, $basearch: System Infrastructure, $arch: System architecture, $YUM 0-9: System Custom variables

    2. How to create a yum warehouse using HTTP as an example:

    (Installation Httpd:yum install httpd--: Service httpd start, add self-boot: chkconfig httpd on)

    httpd root directory for/var/www/html new subdirectory to store the RPM package, to generate metadata files for the warehouse, Createrepo Rpm_dir,createrepo tool can not be used to install (yum install Createrepo), Configure Yum clients to use this warehouse

    3, compile and install the source package:

    ./configure generates makefile files according to the Makefile.in Check compilation environment, make calls the corresponding tool to compile the makefile file, and do install installs the compiled program on the system./configure check the compilation environment, You also need to specify compilation attributes with many options.

    Use of the./configure script: Get help--help, there are some more common options (--prefix=/path: Specify the installation path 、--Sysconfdir=path: Specify the Profile installation path)

    4, after the installation of the configuration:

    Let the binaries go directly without entering the path: Export path= $PATH:/path/to/somewhere, lead album: Edit/etc/ Man.config configuration file, add a Manpath, path to the man directory for the newly installed program, or Man-m/path/keyword

    5, program development: If other applications rely on the development environment of this program, or for this program to do two times development .

    Export library File The first step: Specify that the system search for custom paths, edit/etc/ld.so.conf.d/appname.conf, and second: trigger the system to re-search all library files and generate the cache ldconfig-v

    The path to the export header file/usr/local/nginx/include system your change file is:/usr/include export: Create a link to Ln-sv/usr/local/nginx/include/usr/include/nginx


Marco Education 11th Day, RPM, yum, source program installation

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.