โดยปกติแล้ว yum จะไม่แสดง package ที่เราใส่ exclude list ไว้ในไฟล์ yum.conf ดังนั้นจึงไม่สามารถที่จะรู้ได้ว่า package ที่ได้ ใส่ไว้ใน exclude list update ถึงเวอร์ชั่นอะไร เมื่อใช้คำสั่ง yum update แต่เราสามารถใช้ yum shell แทนการใช้คำสั่ง yum update เพื่อให้สามารถดู package ที่เราได้ใส่ไว้ใน exclude list ว่า update หรือไม่
ตย. ไฟล์ฺ /etc/yum.conf ได้ใส่ exclude=php* เอาไว้ ซึ่งจะทำให้ไม่เห็นไฟล์ update ของ php ดังนั้นถ้าเราต้องการดูว่า package php ได้มีการ update ถึงเวอร์ชั่นไหนแล้ว ก็จะไม่สามารถรู้ได้เมื่อใช้คำสั่ง yum update แต่ถ้าเราใช้ yum shell แทนก็จะรู้ว่า php package ได้ update ถึงเวอร์ชั่นไหนแล้ว
# yum shell
Loading “fastestmirror” plugin
Setting up Yum Shell
> config exclude ‘ ‘
> list updates
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Updated Packages
…..
pfmon.x86_64 3.2-0.060926.5.el5 base
php.x86_64 5.1.6-23.2.el5_3 updates
php-cli.x86_64 5.1.6-23.2.el5_3 updates
php-common.x86_64 5.1.6-23.2.el5_3 updates
php-gd.x86_64 5.1.6-23.2.el5_3 updates
php-imap.x86_64 5.1.6-23.2.el5_3 updates
php-ldap.x86_64 5.1.6-23.2.el5_3 updates
php-mbstring.x86_64 5.1.6-23.2.el5_3 updates
php-mysql.x86_64 5.1.6-23.2.el5_3 updates
php-odbc.x86_64 5.1.6-23.2.el5_3 updates
php-pdo.x86_64 5.1.6-23.2.el5_3 updates
php-pgsql.x86_64 5.1.6-23.2.el5_3 updates
php-xml.x86_64 5.1.6-23.2.el5_3 updates
…
และเมื่อออกจาก yum shell ด้วยคำสั่ง quit หรือ exit ค่า config ต่างๆจะกลับมาเหมือนเดิมตามที่ได้กำหนดไว้ที่ไฟล์ /etc/yum.conf
Related posts:
- How to list the files from rpm package by rpm or yum-utils หากต้องการ list รายชื่อไฟล์ของ rpm package ที่ยังไม่ได้ install หรือ...
- Yum, Yellow dog Update, Modified and How to use Yum Yum หรือ Yellow dog Update, Modified เป็นโปรแกรมจัดการ package...
- Find Out Which RPM Installed a Specific File by rpm or yum Command การตรวจสอบว่าไฟล์หรือคำสั่งต่างๆมาจาก package ไหนบ้าง สามารถทำได้ไม่ยาก โดยจะใช้คำสั่ง rpm หรือ yum...
- Download package using yum command Yum เป็นโปรแกรมสำหรับการติดตั้ง package แบบ online ของ Linux ทางฝั่ง...
- How to install dig, host and nslookup commands on your system เมื่อต้องการรันคำสั่ง dig, host หรือ nslookup แต่เครื่อง linux ของคุณไม่มีคำสั่งดังกล่าวนี้...


August 11th, 2009
Tum.
Posted in
Tags: 