日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

linux下YUM工具的使用:yum安裝/升級(jí)/查看/搜索/卸載軟件包

 頭號(hào)碼甲 2022-05-26 發(fā)布于北京

一.關(guān)于軟件包

在linux中安裝軟件是需要安裝包的,軟件的安裝包有各種類(lèi)型:.zip,.rar,.rpm,.tar.gz,.tar。軟件包還可以分為源代碼包和二進(jìn)制

包,源代碼包是沒(méi)有經(jīng)過(guò)編譯的包,需要經(jīng)過(guò)GCC、C++編譯器環(huán)境編譯才能運(yùn)行。二進(jìn)制包無(wú)需編譯,可以直接安裝使用。區(qū)分是否為

源代碼包還是二進(jìn)制包還得基于軟件包里面的文件來(lái)判斷,包含.h、.c、.cpp、.cc等結(jié)尾的源碼文件,稱(chēng)之為源代碼包,而軟件包里面存

在bin目錄(bin目錄里有可執(zhí)行文件),稱(chēng)之為二進(jìn)制包。源碼包高度可定制,可以自由選擇自己需要的功能。

二.關(guān)于YUM

? yum(全稱(chēng)為 Yellow dog Updater, Modified)是一個(gè)前端軟件包管理器。基于RPM包管理,能夠從指定的服務(wù)器自動(dòng)下載RPM包并

且安裝,可以自動(dòng)處理依賴(lài)性關(guān)系,并且一次安裝所有依賴(lài)的軟體包,無(wú)須繁瑣地一次次下載、安裝。yum提供了查找、安裝、刪除某一

個(gè)、一組甚至全部軟件包的命令,而且命令簡(jiǎn)潔而又好記。yum是基于C/S的架構(gòu),C=client,S=ftp/http/file。

三.yum工具的使用

3.1 yum安裝軟件功能

#安裝軟件包,-y直接安裝
[root@node5 ~]# yum -y install telnet

3.2 yum升級(jí)軟件包功能

[root@node5 ~]# yum -y update    #升級(jí)軟件包,改變軟件設(shè)置和系統(tǒng)設(shè)置,系統(tǒng)版本內(nèi)核都升級(jí),不加任何包,表示整個(gè)系統(tǒng)進(jìn)行升級(jí)
[root@node5 ~]# yum -y upgrade   #升級(jí)軟件包,不改變軟件設(shè)置和系統(tǒng)設(shè)置,系統(tǒng)版本升級(jí),內(nèi)核不改變

3.3 yum查看,搜索功能

#查詢(xún)r(jià)pm包telnet作用
[root@node5 ~]# yum info telnet
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Installed Packages
Name        : telnet
Arch        : x86_64
Epoch       : 1
Version     : 0.17
Release     : 65.el7_8
Size        : 113 k
Repo        : installed
From repo   : updates
Summary     : The client program for the Telnet remote login protocol
URL         : http://web./web/20070819111735/www.hcs.harvard.edu/~dholland/computers/old-netkit.html
License     : BSD
Description : Telnet is a popular protocol for logging into remote systems over the
            : Internet. The package provides a command line Telnet client

#查看命令是哪個(gè)軟件包安裝的
[root@node5 ~]# yum provides /usr/bin/find
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
1:findutils-4.5.11-6.el7.x86_64 : The GNU versions of find utilities (find and xargs)
Repo        : base
Matched from:
Filename    : /usr/bin/find



1:findutils-4.5.11-5.el7.x86_64 : The GNU versions of find utilities (find and xargs)
Repo        : @anaconda
Matched from:
Filename    : /usr/bin/find

#按關(guān)鍵字搜索軟件包
[root@node5 ~]# yum search extundelet
============================================================================================ N/S matched: extundelet ============================================================================================
extundelete.x86_64 : An ext3 and ext4 file system undeletion utility

  Name and summary matches only, use "search all" for everything.

3.4 yum卸載功能

#卸載telnet
[root@node5 ~]# yum -y remove telnet                                                              

總結(jié):如果yum報(bào)錯(cuò),需要注意的幾個(gè)小問(wèn)題:

  • ? 確定光盤(pán)是否連接,光盤(pán)是否掛載
  • ? 配置文件中格式是否正確,字母,符號(hào)有沒(méi)有少寫(xiě),掛載點(diǎn)和配置文件中設(shè)置的是否一致
  • ? 網(wǎng)絡(luò)源需要聯(lián)網(wǎng),操作和RPM類(lèi)似,并且會(huì)自動(dòng)安裝依賴(lài)項(xiàng)

3.5 yum安裝軟件包組功能

1.安裝軟件包組語(yǔ)法:yum groupinstall GROUPNAME

#查看有哪些軟件包組
[root@node5 ~]# yum grouplist

#安裝軟件包組
[root@node5 ~]# yum groupinstall 'Compatibility Libraries' -y  

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多