2018-03-05 Amin Linux Learning

Source: Internet
Author: User
Tags gpg

7.1 Three ways to install packages

rpm 工具    类似Windows exe安装包,安装有固定的路径    软件依赖包需要手动依次安装    Redhat公司开发yum     使用python 开发的    自动安装依赖包    在线安装,最方便源码包    先编译在安装

7.2 RPM Package Introduction

设置光驱并挂载安装镜像文件rpm包格式,报名、版本号、发布版本号、平台rpm -ivh rpm包文件   //安装rpm -Uvh rpm包文件  //升级rpm -e  包名      //卸载rpm -qa          //查询安装的包rpm -q 包名      //查询指定包是否安装rpm -qi 包名     //查询指定包信息rpm -ql 包名    //列出包安装的文件rpm -qf 文件绝对路径   //查看一个文件是由哪个包安装的    um-rhn-plugin-2.0.1-9.el7.noarch.rpm    zlib-devel-1.2.7-17.el7.i686.rpm    zlib-devel-1.2.7-17.el7.x86_64.rpm

How to use 7.3 rpm tools

    [[email protected] packages]# RPM-IVH zsh-html-5.0.2-28.el7.x86_64.rpm in preparation ... #####       ############################ [100%] Upgrading/installing ... 1:zsh-html-5.0.2-28.el7 ################################# [100%] [[email protected] Packages]# rpm-e Z sh-html-5.0.2-28.el7.x86_64 [[email protected] packages]# rpm-q tree tree-1.6.0-10.el7.x86_64 [[email  Protected] packages]# Rpm-qi tree name:tree version:1.6.0 release:10.el7 architecture:x     86_64 Install date:2018 March 01 Thursday 03:31 46 seconds group:applications/file size:89505 License : gplv2+ signature:rsa/sha256, July 04, 2014, Friday 13:36 46 seconds, Key ID 24c6a8a7f4a80eb5 Source rpm:tree-1.6.0-10.el 7.src.rpm build date:2014 June 10 Tuesday 03:28 53 seconds Build Host:worker1.bsys.centos.org Relocations: (Not Reloca Table) Packager:centos Buildsystem 

7.4 Yum Tool usage

Yum list//list available RPM packages Ls/etc/yum.repos.d/yum search VIM/Search package yum install [-y]yum grouplistyum Groupinstall [-y]yum remove [-y]yum Update [-y]yum provides "/*/vim" [[email protected] packages]# ls/etc/yum.repos.d/centos-base . Repo Centos-debuginfo.repo Centos-media.repo Centos-vault.repo centos-cr.repo Centos-fasttrack.repo CentOS-So Urces.repo [[email protected] packages]# Cat/etc/yum.repos.d/centos-base.repo # CentOS-Base.repo # # Th E Mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors tha  T is updated to and # geographically close to the client.    You should the use of this for CentOS updates # unless is manually picking other mirrors.    # # If The mirrorlist= does not work for you, as a fall back to you can try the # remarked out Baseurl= line instead. # # [Base] name=centos-$releasever-base mirrorlist=http://mirrorlist.centos.org/?release= $releAsever&arch= $basearch &repo=os&infra= $infra #baseurl =http://mirror.centos.org/centos/$releasever/os/ $basearch/gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7 #released updates [updates] Name =centos-$releasever-updates mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch    &repo=updates&infra= $infra #baseurl =http://mirror.centos.org/centos/$releasever/updates/$basearch/    Gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7 #additional packages that could be useful [extras] name=centos-$releasever-extras mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch & Amp;repo=extras&infra= $infra #baseurl =http://mirror.centos.org/centos/$releasever/extras/$basearch/gpgcheck =1 gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-7 #additional packages that extend functionality of existing PA   ckages [Centosplus] name=centos-$releasever-plus mirrorlist=http://mirrorlist.centos.org/?release= $releasever &arch= $basearch &repo=centosplus&infra= $infra #baseurl =http://mirror.centos.org/centos/$releasever/centosplus/$basearch/gpgcheck=1 enabled=0 gpgkey=    file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [[email protected] packages]# yum grouplist loaded plugin: fastestmirror The group information file is not installed maybe Run:yum groups Mark convert (see MANS) Loading mirror speeds from cached Hostfile * base:f       tp.sjtu.edu.cn * extras:ftp.sjtu.edu.cn * updates:mirrors.neusoft.edu.cn available environment groupings: Minimal Installation infrastructure server Compute node file and print server Basic Web server virtualization Host server with GUI GNOME desktop KDE Plasma Workspaces development and generation work       Stations available Groups: traditional UNIX Compatibility Compatibility program Library graphical management tools security Tools development tools console Internet Tools smart card support scientific notation support System Management System Management tools completed

7.5 Yum to build a local warehouse

挂载镜像到/mnt 目录cp -r /etc/yum.repos.d /etc/yum.repos.d.bacrm -f /etc/yum.repos.d/*

Vim/etc/yum.repos.d/dvd.repo//content is as follows
[DVD]
Name=install DVD
Baseurl=file:///mnt
Enable=1
Gpgcheck=0

yum clean allyum list

2018-03-05 Amin Linux Learning

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.