您好,登錄后才能下訂單哦!
這篇文章主要講解了“Linux系統(tǒng)yum命令的實(shí)例用法”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“Linux系統(tǒng)yum命令的實(shí)例用法”吧!
yum 語(yǔ)法
yum [options] [command] [package ...]
options:可選,選項(xiàng)包括-h(幫助),-y(當(dāng)安裝過(guò)程提示選擇全部為"yes"),-q(不顯示安裝的過(guò)程)等等。
command:要進(jìn)行的操作。
package:操作的對(duì)象。
yum常用命令
1.列出所有可更新的軟件清單命令:yum check-update
2.更新所有軟件命令:yum update
3.僅安裝指定的軟件命令:yum install 4.僅更新指定的軟件命令:yum update 5.列出所有可安裝的軟件清單命令:yum list
6.刪除軟件包命令:yum remove 7.查找軟件包 命令:yum search
8.清除緩存命令:
yum clean packages: 清除緩存目錄下的軟件包
yum clean headers: 清除緩存目錄下的 headers
yum clean oldheaders: 清除緩存目錄下舊的 headers
yum clean, yum clean all (= yum clean packages; yum clean oldheaders) :清除緩存目錄下的軟件包及舊的headers
實(shí)例 1
安裝 pam-devel
[root@www ~]# yum install pam-devel Setting up Install Process Parsing package install arguments Resolving Dependencies < ==先檢查軟件的屬性相依問(wèn)題 --> Running transaction check ---> Package pam-devel.i386 0:0.99.6.2-4.el5 set to be updated --> Processing Dependency: pam = 0.99.6.2-4.el5 for package: pam-devel --> Running transaction check ---> Package pam.i386 0:0.99.6.2-4.el5 set to be updated filelists.xml.gz 100% |=========================| 1.6 MB 00:05 filelists.xml.gz 100% |=========================| 138 kB 00:00 -> Finished Dependency Resolution ……(省略)
實(shí)例 2
移除 pam-devel
[root@www ~]# yum remove pam-devel Setting up Remove Process Resolving Dependencies < ==同樣的,先解決屬性相依的問(wèn)題 --> Running transaction check ---> Package pam-devel.i386 0:0.99.6.2-4.el5 set to be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Removing: pam-devel i386 0.99.6.2-4.el5 installed 495 k Transaction Summary ============================================================================= Install 0 Package(s) Update 0 Package(s) Remove 1 Package(s) < ==還好,并沒(méi)有屬性相依的問(wèn)題,單純移除一個(gè)軟件 Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : pam-devel ######################### [1/1] Removed: pam-devel.i386 0:0.99.6.2-4.el5 Complete!
實(shí)例 3
利用 yum 的功能,找出以 pam 為開(kāi)頭的軟件名稱有哪些?
[root@www ~]# yum list pam* Installed Packages pam.i386 0.99.6.2-3.27.el5 installed pam_ccreds.i386 3-5 installed pam_krb5.i386 2.2.14-1 installed pam_passwdqc.i386 1.0.2-1.2.2 installed pam_pkcs11.i386 0.5.3-23 installed pam_smb.i386 1.1.7-7.2.1 installed Available Packages < ==底下則是『可升級(jí)』的或『未安裝』的 pam.i386 0.99.6.2-4.el5 base pam-devel.i386 0.99.6.2-4.el5 base pam_krb5.i386 2.2.14-10 base
感謝各位的閱讀,以上就是“Linux系統(tǒng)yum命令的實(shí)例用法”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)Linux系統(tǒng)yum命令的實(shí)例用法這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。