最近在寫自動安裝的程式,常會需要下載rpm檔到其他主機上安裝,還好yum有個plugin可以一個指令就把套件下載下來,讓我提昇不少工作效率。
#利用yum下載plugin
shell> yum install yum-downloadonly
#若只要下載但不安裝
shell> yum install package-name1 package-name2 --downloadonly
#若套件已經安裝上去時要改用reinstall,否則yum會回覆套件已經安裝的訊息。另外套件預設會下載到/var/cache/yum/[repo-type]/packages/下,[repo-type]為套件下載的類型。
shell> yum reinstall package-name1 package-name2
#也可以指定要下載的目錄,例如下載到/root
shell> yum install package-name --downloadonly --downloaddir=/root
轉貼至http://beakdoosan.blogspot.tw/
In case you are interested in generating cash from your websites or blogs via popup advertisments - you should try one of the biggest networks - PopCash.
回覆刪除