yum命令的有关设置

软件仓库的认定

软件仓库的识别认定;软件仓库的作用:指定电脑不识别的可以识别其软件
在软件仓库设定之前需要找到驱动的地址在这里插入图片描述
在这个目录下cd /etc/yum.repos.d/在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

yum命令的用法

yum      clean all    清除原有yum缓存
    repolist    列出仓库信息
    install dhcp(需要安装什么软件,就输入什么软件名称)    安装
    update    更新
    list dhcp    查看软件信息
    list all    查看所有软件
     list installed    查看已安装的所有软件
     list available    查看可安装的软件
     reinstall dhcp    重新安装
     remove software    卸载
     info software    查看软件信息
     search software    根据软件信息查找软件
     whatprovides file    根据文件找出包含此文件的软件
     history    查看系统中软件管理信息
     history info 数字    对改数字为id的信息进行显示
    groups list    列出软件组
     groups info    查看软件组的信息
     groups install sfgroup    安装软件组
     groups remove sgroup    卸载软件组

[root@station yum.repos.d]# yum clean all         ####清除所有的
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: bobo
Cleaning up everything
[root@station yum.repos.d]# yum  install  dhcp        ####安装dhcp
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
bobo | 4.1 kB 00:00
(1/2): bobo/group_gz | 136 kB 00:00
(2/2): bobo/primary_db | 3.9 MB 00:00
Resolving Dependencies
–> Running transaction check
—> Package dhcp.x86_64 12:4.2.5-47.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dhcp x86_64 12:4.2.5-47.el7 bobo 511 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 511 k
Installed size: 1.4 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 12:dhcp-4.2.5-47.el7.x86_64 1/1
bobo/productid | 1.6 kB 00:00
Verifying : 12:dhcp-4.2.5-47.el7.x86_64 1/1
Installed:
dhcp.x86_64 12:4.2.5-47.el7
Complete!                ####安装完成
[root@station yum.repos.d]# yum update             #####查看是否有需要更新的
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No packages marked for update
[root@station yum.repos.d]# yum list dhcp         #######展示dhcp的信息
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
dhcp.x86_64 12:4.2.5-47.el7 @bobo
[root@station yum.repos.d]#
[root@station yum.repos.d]# yum  repolist             ########查看软件仓库
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
bobo bobo 4,751
repolist: 4,751      ####软将仓库共有4751个软件

yumlist all展示所有信息
yumlist available查看所有可安装的软件
yumreinstall重新安装某个软件

[root@station yum.repos.d]# yum history       ######查看yum历史信息
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
ID | Login user | Date and time | Action(s) | Altered
------------------------------------------------------------------------------- 6 | root | 2019-04-15 12:23 | Install | 1
5 | root | 2019-04-13 12:42 | Install | 6
4 | root | 2019-04-10 23:20 | Erase | 1
3 | root | 2019-04-10 22:42 | Install | 1
2 | root | 2019-04-10 22:41 | Install | 5
1 | System | 2019-04-09 18:48 | Install | 1256
history list
[root@station yum.repos.d]# yum history info 3             #######查看id为3的yum历史信息
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Transaction ID : 3
Begin time : Wed Apr 10 22:42:17 2019
Begin rpmdb : 1261:a598204da830d9f8ac91460730945508f20feeb6
End time : 22:42:18 2019 (1 seconds)
End rpmdb : 1262:019df5c166e155a3526fef991ec7aeec5170a947
User : root
Return-Code : Success
Command Line : install dhcp
Transaction performed with:
Installed rpm-4.11.3-21.el7.x86_64 @anaconda/7.3
Installed subscription-manager-1.17.15-1.el7.x86_64 @anaconda/7.3
Installed yum-3.4.3-150.el7.noarch @anaconda/7.3
Packages Altered:
Install dhcp-12:4.2.5-47.el7.x86_64 @bobo
history info
[root@station yum.repos.d]#

[root@station yum.repos.d]# yum info dhcp             查看dhcp的信息
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
Name : dhcp
Arch : x86_64
Epoch : 12
Version : 4.2.5
Release : 47.el7
Size : 1.4 M
Repo : installed
From repo : bobo
Summary : Dynamic host configuration protocol software
URL : http://isc.org/products/DHCP/
License : ISC
Description : DHCP (Dynamic Host Configuration Protocol) is a protocol which
: allows individual devices on an IP network to get their own
: network configuration information (IP address, subnetmask,
: broadcast address, etc.) from a DHCP server. The overall purpose
: of DHCP is to make it easier to administer a large network.
:
: To use DHCP on your network, install a DHCP service (or relay
: agent), and on clients run a DHCP client daemon. The dhcp package
: provides the ISC DHCP service and relay agent.
[root@station yum.repos.d]# yum search dhcp             #####查找dhcp有关的信息
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
============================== N/S matched: dhcp ===============================
dhcp-common.x86_64 : Common files used by ISC dhcp client and server
dhcp-libs.i686 : Shared libraries used by ISC dhcp client and server
dhcp-libs.x86_64 : Shared libraries used by ISC dhcp client and server
dhclient.x86_64 : Provides the ISC DHCP client daemon and dhclient-script
dhcp.x86_64 : Dynamic host configuration protocol software
dnsmasq.x86_64 : A lightweight DHCP/caching DNS server
Name and summary matches only, use “search all” for everything.

yumwhatprovides file根据文件找出包含此文件的软件
yumremove卸载
yum网络源下载共享

在一台已经链接好的本地yum源的主机中安装httpd在这里插入图片描述
安装以后需要配置网络yum源在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

测试
在这里插入图片描述

第三方软件仓库的搭建

1,createrepo -v /存放软件包的目录
在这里插入图片描述
编辑内容在这里插入图片描述
yum clean all 清理
yum list dhcp
在这里插入图片描述

rpm     命令处理软件

rpm      -i   安装
    -v   显示过程   安装软件为 -ivh
     -h   hsh加密
    --nodeps   安装软件忽略软件依赖
在这里插入图片描述
     -e   卸载
     -q   查看 在这里插入图片描述
    -a   所有
在这里插入图片描述
    -p    软件包在这里插入图片描述

     -ql   查看软件在系统中的安装文件路径
在这里插入图片描述
     -qlp    查看未安装的软件包在系统中如果安装后产生文件的路径在这里插入图片描述
     -qf   根据某个文件找出文件属于那个安装包在这里插入图片描述
     -qc   查看软件的配置文件名称 在这里插入图片描述
     -qd   查看软件的帮助文件在这里插入图片描述
     --scripts   查看脚本在这里插入图片描述
     --force   强行安装软件在这里插入图片描述
     -Kv   检测软件包是否被篡改在这里插入图片描述

软件包名称详解
kolourpaint-4.10.5-4.e17.x86_64.rpm
[1]       [2]       [3] [4]   [5]
[1] 软件名称
[2] 版本
[3] 适用的系统版本
[4] 构架,用的是64位
[5] 适用rpm体系软件 rpm[redhat packages manager]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值