FAlinux03 basics

One package installation

    rpm Binary software compiled by Red Hat Package Manager 

    rpm -qpi 

    rpm -ivh package file (absolute path)  package installation   humanized display process can not resolve dependencies specified source mounting mesh size

Yum solves the dependency relationship of rpm package installation

mount /dev/cdrom /media mount the CD to /media

yum warehouse: specify the location of the software package, yum environment variables

Delete the original rhe.repo with file.repo under /etc/yum.repos.d/

dvd.repo file name

    [dvd] Warehouse name

    name=dvd description information, you can write it casually

    baseurl= file:// /media       specifies the location of the software package, using url to indicate that it can also be baseurl= http://192.168.9.101/pub   to the upper-level directory of repodata

    enabled=1 Whether the warehouse is turned on   1 is turned on (default is turned on, not written or written incorrectly)    0 is turned off and can be omitted

    gpgcheck=1 Whether to check the integrity of the package gpgcheck=0

    gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release   public key (from the CD, copied to this directory after installing the system) path is fixed

    Red Hat will sign the package with the private key and put the public key on the CD. After the system is installed, it will be copied to the system. When the package is installed, the system will pass

    The public key is decrypted. If it can be decrypted, the software package is complete

    Private key encryption, public key decryption-digital signature

Verify that the warehouse is correct

    yum clean all clear the cache

    yum list all lists the repositories currently configured for all packages

One file can build multiple warehouses, or you can create a new file, all .repo will be accessed during installation, and the latest version will be used first

Configure yum network warehouse source

    1. Configure local warehouse and install http service

    #yum -y install httpd

    #systemctl enable httpd

    #systemctl start httpd

   Turn off the firewall (network-based firewall)

    #systemctl disable firewalld

    #systemctl stop firewalld

   Close selinux (based on kernel firewall)

        /etc/selinux/config

            SELINUX=disabled

            setenforce 0 temporarily closed 

    2 Mount or copy the contents of the CD to the directory corresponding to the http server

    # umount /media/

    #mkdir / var / www / html / pub

    #mount /dev/cdrom /var/www/html/pub

    #vim /etc/yum.repos.d/dvd.repo

    baseurl=http://192.168.9.101/pub

Package installation

    yum install package name -y       -d download to local package

    yum localinstall linuxqq package file to  solve network download files to solve dependencies from local yum source

How to install the graphical interface can use wildcards to install a group of packages

yum groupinstall  

    yum grouplist view which groups the system has

    yum groupinstall "X Window System" "GNOME" install the graphical interface startx or init 5

    yum groupinstall tab can also see the available group packages

Uninstall package

    rpm -e package name

    yum remove package name solves the dependency of uninstalling installation package -y is best not to add

yum provider "*/sar" View the package required by the command, you can also query if it is not installed in the system

Inquire

     rpm -qa query all installed packages in the system|grep package name query the corresponding package

    q query query -a all all

    rpm -ql package name Query the location of the package installation system

    rpm -qf /usr/local/iostat file belongs to which package

Guess you like

Origin blog.51cto.com/14234935/2594024