Menggunakan Yum untuk Administrasi Package di FC4

Attention: open in a new window. PDFPrintE-mail

Bagi kamu yang biasa menggunakan Mandrake, tentu sudah paham bahwa Mdk menyediakan sebuah command yang sangat memudahkan untuk administrasi package yaitu urpmi. Dimana bila kita menggunakan command rpm sendiri saja, maka ada kemungkinan kita akan direpotkan dengan message bahwa untuk install rpm ini, diperlukan dependency A, dan untuk install A tersebut, diperlukan dependency B, dstnya. Hal ini dinamakan 'rpm hell'.

Tapi sekarang tidak lagi. Redhat, dalam hal ini Fedora Project menyediakan sebuah utility yang dinamakan yum (yellowdog update manager). Dengan menggunakan utility ini kita bisa menginstall package2 rpm tanpa harus repot memikirkan dependencynya.

Bagaimana cara menggunakannya? Sebelumnya perlu diketahui file2 configurasi yum, yaitu ada di:
/etc/yum/ <-- berisi script untuk otomatis update per hari
/etc/yum.repos.d/ <-- berisi daftar alamat tempat repository yang akan dicari yum

Secara default, FC4 menyediakan 3 buah kelompok repository, yaitu:
fedora.repo
fedora-updates.repo
fedora-extras.repo

Namun sebenarnya disediakan pula repo2 untuk package2 yang sedang dalam status dikembangkan, saat ini sedang dikembangkan untuk Fedora Core 5. Mungkin di Mandrake kita mengenal istilah: cooker.

Repo2 development tersebut adalah:
fedora-devel.repo
fedora-updates-testing.repo
fedora-extras-devel.repo

Untuk mulai menggunakan yum, syaratnya adalah kita mesti terkonek ke internet, dan tentu lebih baik lagi bila koneksi kita tersebut lumayan cepat. Ok, sebagai root, kita jalankan yum.

Untuk mengecek update2 yang ada:
[root@fc4 etc]# yum check-update
Setting up repositories
dries                     100% |=========================|  951 B    00:00
livna                     100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
updates-released          100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files

HelixPlayer.i386                         1:1.0.5-1.fc4.2        updates-released
ImageMagick.i386                         6.2.2.0-3.fc4.0        updates-released
MyODBC.i386                              2.50.39-25.FC4.1       updates-released
NetworkManager.i386                      0.4-20.FC4.1           updates-released
NetworkManager-gnome.i386                0.4-20.FC4.1           updates-released
alsa-lib.i386                            1.0.9rf-2.FC4          updates-released

Untuk mengupdate package tersebut cukup mengetik:
[root@fc4 etc]# yum update ImageMagick

Bagaimana untuk mencari suatu package? Misalkan kita ingin mencari synaptic:
[root@fc4 etc]# yum search synaptic

Maka akan muncul daftar2 package yang ada kata synapticnya, dan bila sudah ketemu, kita kemudian tinggal menginstallnya:
[root@fc4 etc]# yum install synaptic

Setting up Install Process
Setting up repositories
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for synaptic to pack into transaction set.
synaptic-0.57.2-1.fc4.i38 100% |=========================|  27 kB    00:01
---> Package synaptic.i386 0:0.57.2-1.fc4 set to be updated
--> Running transaction check
--> Processing Dependency: libapt-pkg-libc6.3-6.so.2 for package: synaptic
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for apt to pack into transaction set.
apt-0.5.15cnc7-6.fc4.i386 100% |=========================|  41 kB    00:01
---> Package apt.i386 0:0.5.15cnc7-6.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 synaptic                i386       0.57.2-1.fc4     extras            1.6 M
Installing for dependencies:
 apt                     i386       0.5.15cnc7-6.fc4  extras            898 k

Transaction Summary
=============================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 2.5 M
Is this ok [y/N]: y

Downloading Packages:
(1/2): synaptic-0.57.2-1. 100% |=========================| 1.6 MB    01:06
(2/2): apt-0.5.15cnc7-6.f 100% |=========================| 898 kB    00:34
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
public key not available for synaptic-0.57.2-1.fc4.i386.rpm
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
Importing GPG key 0x1AC70CE6 "Fedora Pre Extras Release < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >"
Is this ok [y/N]: y
Key imported successfully
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: apt                          ######################### [1/2]
  Installing: synaptic                     ######################### [2/2]

Installed: synaptic.i386 0:0.57.2-1.fc4
Dependency Installed: apt.i386 0:0.5.15cnc7-6.fc4
Complete!


Nah, menarik dan mudah sekali bukan?

Nanti dulu, sebelum kita lebih bersemangat lagi, masih ada kejutan lainnya, yaitu: kita bisa menambahkan repository lainnya, yang mana tentunya menyediakan package2 lainnya yang tidak disediakan secara resmi oleh Fedora.

Repository lain yang yang saya pakai adalah: dries dan livna. Sebenarnya masih banyak repository lainnya seperti freshrpm dll, tapi saya dapat masukkan di milis sebaiknya tidak menggunakan repository tersebut karena tidak compatible dengan Fedora.

Untuk menambahkan repository, kamu create file livna.repo dan dries.repo di direktori /etc/yum.repos.d/

Isi file livna.repo:
[livna]
name=Livna for Fedora Core $releasever - $basearch - Base
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.lvn/
#baseurl=http://livna.cat.pdx.edu/fedora/$releasever/$basearch/RPMS.lvn/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna


[livna-testing]
name=Livna for Fedora Core $releasever - $basearch - Testing
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.lvn-testing
#baseurl=http://livna.cat.pdx.edu/fedora/$releasever/$basearch/RPMS.lvn-testing
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna


Isi file dari dries.repo:
[dries]
name=Extra Fedora rpms dries - $releasever - $basearch
baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/linux/$releasever/$basearch/dries/RPMS/


Dengan telah ditambahkannya repository livna dan dries itu, maka kini kita bisa menginstall package xine yang telah lengkap librarynya untuk memutar multimedia kesukaan kita.

[root@fc4 etc]# yum install xine
Setting up Install Process
Setting up repositories
livna                     100% |=========================|  951 B    00:00
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 109 kB    00:08
livna     : ################################################## 333/333
Added 333 new packages, deleted 0 old in 4.95 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for xine to pack into transaction set.
xine-0.99.4-0.lvn.1.4.i38 100% |=========================|  26 kB    00:01
---> Package xine.i386 0:0.99.4-0.lvn.1.4 set to be updated
--> Running transaction check
--> Processing Dependency: libaa.so.1 for package: xine
--> Processing Dependency: libxine.so.1 for package: xine
--> Processing Dependency: liblirc_client.so.0 for package: xine
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for lirc to pack into transaction set.
lirc-0.7.1-3.i386.rpm     100% |=========================|  26 kB    00:01
---> Package lirc.i386 0:0.7.1-3 set to be updated
---> Downloading header for xine-lib to pack into transaction set.
xine-lib-1.1.0-0.lvn.1.4. 100% |=========================|  36 kB    00:02
---> Package xine-lib.i386 0:1.1.0-0.lvn.1.4 set to be updated
---> Downloading header for aalib to pack into transaction set.
aalib-1.4.0-0.rc5.4.i386. 100% |=========================| 5.3 kB    00:00
---> Package aalib.i386 0:1.4.0-0.rc5.4 set to be updated
--> Running transaction check
--> Processing Dependency: libmodplug.so.0 for package: xine-lib
--> Processing Dependency: libiso9660.so.4 for package: xine-lib
--> Processing Dependency: libvcdinfo.so.0(VCDINFO_0) for package: xine-lib
--> Processing Dependency: libcdio.so.6(CDIO_6) for package: xine-lib
--> Processing Dependency: libdirectfb-0.9.so.22 for package: xine-lib
--> Processing Dependency: libcdio.so.6 for package: xine-lib
--> Processing Dependency: libvcdinfo.so.0 for package: xine-lib
--> Processing Dependency: libfusion-0.9.so.22 for package: xine-lib
--> Processing Dependency: libdirect-0.9.so.22 for package: xine-lib
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for directfb to pack into transaction set.
directfb-0.9.22-2.fc4.i38 100% |=========================|  19 kB    00:01
---> Package directfb.i386 0:0.9.22-2.fc4 set to be updated
---> Downloading header for libmodplug to pack into transaction set.
libmodplug-0.7-2.i386.rpm 100% |=========================| 2.9 kB    00:00
---> Package libmodplug.i386 1:0.7-2 set to be updated
---> Downloading header for libcdio to pack into transaction set.
libcdio-0.75-3.fc4.i386.r 100% |=========================| 6.8 kB    00:00
---> Package libcdio.i386 0:0.75-3.fc4 set to be updated
---> Downloading header for vcdimager to pack into transaction set.
vcdimager-0.7.21-0.lvn.2. 100% |=========================| 9.7 kB    00:00
---> Package vcdimager.i386 0:0.7.21-0.lvn.2.4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 xine                    i386       0.99.4-0.lvn.1.4  livna             1.5 M
Installing for dependencies:
 aalib                   i386       1.4.0-0.rc5.4    extras             69 k
 directfb                i386       0.9.22-2.fc4     extras            1.9 M
 libcdio                 i386       0.75-3.fc4       extras            235 k
 libmodplug              i386       1:0.7-2          extras            110 k
 lirc                    i386       0.7.1-3          extras            331 k
 vcdimager               i386       0.7.21-0.lvn.2.4  livna             649 k
 xine-lib                i386       1.1.0-0.lvn.1.4  livna             4.4 M

Transaction Summary
=============================================================================
Install      8 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 9.1 M
Is this ok [y/N]:

Downloading Packages:
(1/8): xine-lib-1.1.0-0.l 100% |=========================| 4.4 MB    04:34
(2/8): directfb-0.9.22-2. 100% |=========================| 1.9 MB    02:34
(3/8): libmodplug-0.7-2.i 100% |=========================| 110 kB    00:08
(4/8): libcdio-0.75-3.fc4 100% |=========================| 235 kB    00:19
(5/8): vcdimager-0.7.21-0 100% |=========================| 649 kB    00:37
(6/8): lirc-0.7.1-3.i386. 100% |=========================| 331 kB    00:22
(7/8): xine-0.99.4-0.lvn. 100% |=========================| 1.5 MB    02:17
(8/8): aalib-1.4.0-0.rc5. 100% |=========================|  69 kB    00:08
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID a109b1ec
public key not available for xine-lib-1.1.0-0.lvn.1.4.i386.rpm
Retrieving GPG key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna
Importing GPG key 0xA109B1EC "Livna.org rpms < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >"
Is this ok [y/N]: y
Key imported successfully
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: aalib                        ######################### [1/8]
  Installing: libcdio                      ######################### [2/8]
  Installing: vcdimager                    ######################### [3/8]
  Installing: lirc                         ######################### [4/8]
  Installing: libmodplug                   ######################### [5/8]
  Installing: directfb                     ######################### [6/8]
  Installing: xine-lib                     ######################### [7/8]
  Installing: xine                         ######################### [8/8]

Installed: xine.i386 0:0.99.4-0.lvn.1.4
Dependency Installed: aalib.i386 0:1.4.0-0.rc5.4 directfb.i386 0:0.9.22-2.fc4 libcdio.i386 0:0.75-3.fc4 libmodplug.i386 1:0.7-2 lirc.i386 0:0.7.1-3 vcdimager.i386 0:0.7.21-0.lvn.2.4 xine-lib.i386 0:1.1.0-0.lvn.1.4
Complete!

Ok, semoga artikel ini bermanfaat. Selamat ber yum yum :)

v.1.0 by ari_stress a.k.a tiger74 a.k.a Fajar Priyanto
Jakarta, 30 Agustus 2005. fajarpri at arinet dot org
Penulis adalah Microsoft Certified Professional, yang jatuh cinta kepada Linux. Bekerja di sebuah group otomotif di Jakarta.

Comments (2)
  • aziz
    mas bisa japri ke aku langkah - langkah dari awal samapai
    akhir (ex:seting HTTPnya,Apachenya, atau yg lainnya) saya newbie nih mau praktik buat yum server gitu
    makasih
  • good_hawky
    Mas bagaimana cara konfigurasi dengan offline
Only registered users can write comments!