在linux中安裝軟件是需要安裝包的,軟件的安裝包有各種類型:.zip,.rar,.rpm,.tar.gz,.tar。軟件包還可以分為源代碼包和二進(jìn)制
包,源代碼包是沒有經(jīng)過編譯的包,需要經(jīng)過GCC、C++編譯器環(huán)境編譯才能運(yùn)行。二進(jìn)制包無需編譯,可以直接安裝使用。區(qū)分是否為
源代碼包還是二進(jìn)制包還得基于軟件包里面的文件來判斷,包含.h、.c、.cpp、.cc等結(jié)尾的源碼文件,稱之為源代碼包,而軟件包里面存
在bin目錄(bin目錄里有可執(zhí)行文件),稱之為二進(jìn)制包。源碼包高度可定制,可以自由選擇自己需要的功能。
? yum(全稱為 Yellow dog Updater, Modified)是一個(gè)前端軟件包管理器?;赗PM包管理,能夠從指定的服務(wù)器自動(dòng)下載RPM包并
且安裝,可以自動(dòng)處理依賴性關(guān)系,并且一次安裝所有依賴的軟體包,無須繁瑣地一次次下載、安裝。yum提供了查找、安裝、刪除某一
個(gè)、一組甚至全部軟件包的命令,而且命令簡潔而又好記。yum是基于C/S的架構(gòu),C=client,S=ftp/http/file。
#安裝軟件包,-y直接安裝
[root@node5 ~]# yum -y install telnet
[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)核不改變
#查詢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.
#卸載telnet
[root@node5 ~]# yum -y remove telnet
總結(jié):如果yum報(bào)錯(cuò),需要注意的幾個(gè)小問題:
1.安裝軟件包組語法:yum groupinstall GROUPNAME
#查看有哪些軟件包組
[root@node5 ~]# yum grouplist
#安裝軟件包組
[root@node5 ~]# yum groupinstall 'Compatibility Libraries' -y
聯(lián)系客服