[Linux] 在 CentOS 7 上加入 EPEL repository 來安裝 atop

[Linux] 在 CentOS 7 上加入 EPEL repository 來安裝 atop

今天在 CentOS 7 上想看個記憶體狀況,習慣性的打下 atop…

唔!沒有 atop 這個指令!

用 yum search atop 看看…. 也沒找到?!

 

查了一下,原來 atop 這個套件要在 EPEL 這個 repository 才找的到~

參考了一下 Install EPEL Repo on a CentOS and RHEL 7.x 這篇,總算成功裝好 atop 啦~

 

1. 使用 yum 安裝 epel-release

網頁上常見的作法是用 wget 去抓下 epel-release 相關的 RPM 檔,再用 yum 安裝…

不過以我的例子來說,直接用 yum install epel-release,

它就為自動抓下正確的 RPM 檔安裝了,省去 wget 的功夫:

sudo yum -y install epel-release

 

2. 確認一下現在的 repository 列表 

用 yum repolist 看看現在的 repository 列表裡面,是不是有 epel:

testuser@localhost /tmp $ yum repolist
Loaded plugins: fastestmirror
base                                              | 3.6 kB  00:00:00
epel/x86_64/metalink                              | 4.0 kB  00:00:00
epel                                              | 4.4 kB  00:00:00
extras                                            | 3.4 kB  00:00:00
updates                                           | 3.4 kB  00:00:00
(1/2): epel/x86_64/group_gz                       | 250 kB  00:00:00
(2/2): epel/x86_64/primary_db                     | 3.6 MB  00:00:03
(1/2): epel/x86_64/updateinfo                     | 177 kB  00:00:00
(2/2): epel/x86_64/pkgtags                        | 1.3 MB  00:00:00
Loading mirror speeds from cached hostfile
* base: mirrors.cug.edu.cn
* epel: mirrors.ispros.com.bd
* extras: ftp.tc.edu.tw
* updates: mirrors.nwsuaf.edu.cn
repo id           repo name                                        status
base/7/x86_64     CentOS-7 - Base                                  8,465
epel/x86_64       Extra Packages for Enterprise Linux 7 - x86_64   6,663
extras/7/x86_64   CentOS-7 - Extras                                   77
updates/7/x86_64  CentOS-7 - Updates                               1,350
repolist: 16,555

 

3. 使用 yum 安裝 atop

當 epel 的 repository 確定存在之後,再用 yum install atop,

應該就可以正確找到套件並安裝啦~ ^^

sudo yum -y install atop

 

 

(本頁面已被瀏覽過 1,932 次)

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料