RPM Repository ที่ควรเพิ่มให้กับ CentOS

นอกจาก repo มาตรฐานแล้วควรเพิ่ม repo ต่อไปนี้ด้วย

Dag RPM Repository (RPM forge)

# wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt# rpm --import RPM-GPG-KEY.dag.txt# rm -f RPM-GPG-KEY.dag.key# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

EPEL (Extra Packages for Enterprise Linux)

# wget http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL# rpm --import RPM-GPG-KEY-EPEL# rm -f RPM-GPG-KEY-EPEL# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

เสร็จแล้วก็ update repolist ซะ

# yum repolist

แต่เมื่อลองใช้งานจริงจะพบว่า package มัน conflict กัน ระหว่าง repo ก็เลยต้องเพิ่มเติมดังนี้

# yum install yum-priorities

แก้ไข yum-priorities config

# nano /etc/yum/pluginconf.d/priorities.conf

ให้เป็นดังนี้นี้

[main]enabled = 1check_obsoletes = 1

แล้วก็ไปจัด priorities ของ repo ตามต้องการ

# nano /etc/yum.repoes.d/CentOS-Base.repo

เพิ่ม priority=N เข้าไปในทุกๆ section โดยที่ N เป็นตัวเลข 1 – 99 และ 1 จะสำคัญกว่า 99

[base]priority=1

[updates]priority=1

[addons]priority=1

[extras]priority=1

[centosplus]priority=10

[contrib]priority=10

แล้วก็ไปเพิ่ม priority=20 ใน epel.repo และ rpmforge.repo ด้วย

ที่มา : http://wiki.centos.org/PackageManagement/Yum/Priorities

Advertisement
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.