yum简介
yum = Yellow dog
Updater, Modified
主要功能是更方便的添加/删除/更新RPM包.
它能自动解决包的倚赖性问题.
它能便于管理大量系统的更新问题
当前linux版本rhel7.0
前提
mount DVD光盘到/mnt因为配置时候路径名里面不能有空格,否则不能识别
[root@LiuZhen
mnt]# mount /dev/sr0 /mnt
在目录/etc/yum.repos.d/创建文件文件名.repo
也可以VI直接编辑
[root@LiuZhen
mnt]# cat> /etc/yum.repos.d/dvd.repo<< EOF
> [testyum]
> name=dvd
> baseurl=
> enable=1
> EOF
编辑完成,查看一下
[root@LiuZhen
mnt]# cat /etc/yum.repos.d/dvd.repo
[testyum]
name=dvd
baseurl=
enable=1
导入release相关文件
[root@LiuZhen
mnt]# rpm --import RPM-GPG-KEY-redhat-release
以上已经配置完成,安装dovecot进行测试
安装dovecot包文件
[root@LiuZhen
mnt]# yum -y install dovecot
Loaded plugins:
langpacks, product-id, subscription-manager
This system is not
registered to Red Hat Subscription Management. You can use subscription-manager
to register.
Resolving
Dependencies
--> Running
transaction check
---> Package
dovecot.x86_64 1:2.2.10-4.el7 will be installed
--> Processing
Dependency: libclucene-core.so.1()(64bit) for package:
1:dovecot-2.2.10-4.el7.x86_64
--> Processing
Dependency: libclucene-shared.so.1()(64bit) for package:
1:dovecot-2.2.10-4.el7.x86_64
--> Running
transaction check
---> Package
clucene-core.x86_64 0:2.3.3.4-11.el7 will be installed
--> Finished
Dependency Resolution
Dependencies Resolved
==================================================================================================================
PackageArchVersionRepositorySize
==================================================================================================================
Installing:
dovecotx86_641:2.2.10-4.el7testyum3.2 M
Installing for
dependencies:
clucene-corex86_642.3.3.4-11.el7testyum528 k
Transaction Summary
==================================================================================================================
Install1 Package (+1 Dependent package)
Total download size:
3.7 M
Installed size: 12 M
Downloading packages:
------------------------------------------------------------------------------------------------------------------
Total59 MB/s | 3.7 MB00:00:00
Running transaction
check
Running transaction
test
Transaction test
succeeded
Running transaction
Warning: RPMDB
altered outside of yum.
Installing :
clucene-core-2.3.3.4-11.el7.x86_641/2
Installing :
1:dovecot-2.2.10-4.el7.x86_642/2
testyum/productid| 1.6 kB00:00:00
Verifying: 1:dovecot-2.2.10-4.el7.x86_641/2
Verifying: clucene-core-2.3.3.4-11.el7.x86_642/2
Installed:
dovecot.x86_64 1:2.2.10-4.el7
Dependency Installed:
clucene-core.x86_64 0:2.3.3.4-11.el7
Complete!
Public key for
dovecot-2.2.10-4.el7.x86_64.rpm is not installed
查看包安装结果
[root@LiuZhen
~]# rpm -qa dovecot
dovecot-2.2.10-4.el7.x86_64
删除包操作
[root@LiuZhen
mnt]# yum -y remove dovecot
Loaded plugins:
langpacks, product-id, subscription-manager
This system is not
registered to Red Hat Subscription Management. You can use subscription-manager
to register.
Resolving
Dependencies
--> Running
transaction check
---> Package
dovecot.x86_64 1:2.2.10-4.el7 will be erased
--> Finished
Dependency Resolution
Dependencies Resolved
==================================================================================================================
PackageArchVersionRepositorySize
==================================================================================================================
Removing:
dovecotx86_641:2.2.10-4.el7@testyum9.7 M
Transaction Summary
==================================================================================================================
Remove1 Package
Installed size: 9.7 M
Downloading packages:
Running transaction
check
Running transaction
test
Transaction test
succeeded
Running transaction
Erasing: 1:dovecot-2.2.10-4.el7.x86_641/1
Verifying: 1:dovecot-2.2.10-4.el7.x86_641/1
Removed:
dovecot.x86_64 1:2.2.10-4.el7
Complete!