- Query/Search packages
untuk searching/query packages, gunakan “yum search nama_packages“[anif@anif ~]$ yum search xmms mp3
Loaded plugins: langpacks, presto, refresh-packagekit
============================ N/S Matched: xmms, mp3 ============================
xmms-mp3.i586 : MP3 output plugin for XMMSFull name and summary matches only, use “search all” for everything.
Command lain yang bisa digunakan untuk query informasi package, repositories adalah “yum list expression_name/options”
menampilkan list packages yang memiliki string “team*”[anif@anif ~]$ yum list team*
Loaded plugins: langpacks, presto, refresh-packagekit
Available Packages
teamgit.i686 1:0.0.9-5.20090205.fc15 fedora
teamviewer6.i386 6.0.9258-1 urangkayoMenampilkan seluruh package yang terinstall pada system
[anif@anif ~]$ yum list installed
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
BackupPC.i686 3.1.0-17.fc15 @anaconda-InstallationRepo-201105131946.i686
ConsoleKit.i686 0.4.5-1.fc15 @anaconda-InstallationRepo-201105131946.i686Menampilkan seluruh packages yang ada (baik yang terinstall atau yang ada di repositories)
[anif@anif ~]$ yum list all
Menampilkan packages yang available pada repositories
[anif@anif ~]$ yum list available
Menampilkan list dari group
[anif@anif ~]$ yum grouplist
Untuk menampilkan daftar repo yang ada di /etc/yum.repos.d
[anif@anif ~]$ yum repolist
Loaded plugins: langpacks, presto, refresh-packagekit
repo id repo name status
adobe-linux-i386 Adobe Systems Incorporated 18
fedora Fedora 15 – i386 19,365
rpmfusion-free RPM Fusion for Fedora 15 – Free 370
rpmfusion-free-updates RPM Fusion for Fedora 15 – Free – Updates 193
rpmfusion-nonfree RPM Fusion for Fedora 15 – Nonfree 160
rpmfusion-nonfree-updates RPM Fusion for Fedora 15 – Nonfree – Updates 67
updates Fedora 15 – i386 – Updates 3,054
urangkayo urangkayo Local Repo F15 2
repolist: 23,229 - Check update
untuk melihat apakah package yang terinstall memiliki update terbaru, command yang bisa digunakan adalah “yum check-update“[anif@anif ~]$ yum check-update
Loaded plugins: langpacks, presto, refresh-packagekitcups.i686 1:1.4.7-3.fc15 updates
cups-libs.i686 1:1.4.7-3.fc15 updates
gdb.i686 7.2.90.20110703-40.fc15 updates
ibus.i686 1.3.99.20110419-9.fc15 updates
ibus-anthy.i686 1.2.6-2.fc15 updates
ibus-gtk2.i686 1.3.99.20110419-9.fc15 updates
ibus-gtk3.i686 1.3.99.20110419-9.fc15 updates
ibus-libs.i686 1.3.99.20110419-9.fc15 updates
libblkid.i686 2.19.1-1.3.fc15 updates
libmount.i686 2.19.1-1.3.fc15 updates
libuuid.i686 2.19.1-1.3.fc15 updates
libuuid-devel.i686 2.19.1-1.3.fc15 updates
perl-Image-ExifTool.noarch 8.60-1.fc15 updates
qt.i686 1:4.7.3-6.fc15 updates
qt-webkit.i686 1:4.7.3-6.fc15 updates
qt-x11.i686 1:4.7.3-6.fc15 updates
selinux-policy.noarch 3.9.16-32.fc15 updates
selinux-policy-targeted.noarch 3.9.16-32.fc15 updates
util-linux.i686 2.19.1-1.3.fc15 updates - Update system/packages
“yum update” akan meng-update keseluruhan package yang terinstall, untuk meng-update package tertentu gunakan “yum update package_name”
contoh dari output “yum check-update” sebelumnya kita ingin meng-update package “cups”, pada command line terminal jalankan perintah “yum update cups”[root@anif ~]# yum update cups
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package cups.i686 1:1.4.6-15.fc15 will be updated
—> Package cups.i686 1:1.4.7-3.fc15 will be an update
–> Processing Dependency: cups-libs = 1:1.4.7-3.fc15 for package: 1:cups-1.4.7-3.fc15.i686
–> Running transaction check
—> Package cups-libs.i686 1:1.4.6-15.fc15 will be updated
—> Package cups-libs.i686 1:1.4.7-3.fc15 will be an update
–> Finished Dependency ResolutionDependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
cups i686 1:1.4.7-3.fc15 updates 2.3 M
Updating for dependencies:
cups-libs i686 1:1.4.7-3.fc15 updates 346 kTransaction Summary
================================================================================
Upgrade 2 Package(s)Total download size: 2.7 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta | 335 kB 00:01
Processing delta metadata
Download delta size: 670 k
(1/2): cups-1.4.6-15.fc15_1.4.7-3.fc15.i686.drpm | 550 kB 00:02
(2/2): cups-libs-1.4.6-15.fc15_1.4.7-3.fc15.i686.drpm | 119 kB 00:01
Finishing rebuild of rpms, from deltarpms
<delta rebuild> | 2.7 MB 00:04
Presto reduced the update size by 76% (from 2.7 M to 670 k).
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 1:cups-libs-1.4.7-3.fc15.i686 1/4
Updating : 1:cups-1.4.7-3.fc15.i686 2/4
Cleanup : 1:cups-1.4.6-15.fc15.i686 3/4
Cleanup : 1:cups-libs-1.4.6-15.fc15.i686 4/4Updated:
cups.i686 1:1.4.7-3.fc15Dependency Updated:
cups-libs.i686 1:1.4.7-3.fc15Complete!
Perintah berikut akan mengupdate keseluruhan packages,
[root@anif ~]# yum update
- Install Package
untuk melakukan installlasi package, gunakan “yum install package_name“.[root@anif ~]# yum install tcsh
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Package tcsh-6.17-15.fc15.i686 already installed and latest version
Nothing to do
[root@anif ~]# yum install ksh
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package ksh.i686 0:20110505-2.fc15 will be installed
–> Finished Dependency ResolutionDependencies Resolved
================================================================================================
Package Arch Version Repository Size
================================================================================================
Installing:
ksh i686 20110505-2.fc15 updates 756 kTransaction Summary
================================================================================================
Install 1 Package(s)Total download size: 756 k
Installed size: 2.8 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 756 k
ksh-20110505-2.fc15.i686.rpm | 756 kB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ksh-20110505-2.fc15.i686 1/1Installed:
ksh.i686 0:20110505-2.fc15Complete!
- Uninstall package
Digunakan untuk melakukan uninstall package yang diinginkan, jika package yang diuninstall memiliki dependencies dengan package lain, maka package tersebut juga akan ikut di uninstall. Untuk uninstall package gunakan “yum erase/remove packages_name“.
Yum tidak bisa digunakan untuk uninstall package yum itu sendiri, jika dilakukan maka akan muncul errorError: Trying to remove “yum”, which is protected
Seperti terlihat pada output dibawah, yum akan uninstall semua package yang memiliki dependencies, dimana yang di uninstall hanya package NetworkManager, tapi yum juga ikut uninstall package lain yang memiliki dependencies dengan NetworkManager.
[root@anif ~]# yum erase NetworkManager
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Remove Process
Resolving Dependencies
–> Running transaction check
—> Package NetworkManager.i686 1:0.8.9997-5.git20110702.fc15 will be erased
–> Processing Dependency: NetworkManager >= 1:0.8.998 for package: NetworkManager-openconnect-0.8.999-1.fc15.i686
–> Processing Dependency: NetworkManager = 1:0.8.9997-5.git20110702.fc15 for package: 1:NetworkManager-gnome-0.8.9997-5.git20110702.fc15.i686
–> Processing Dependency: NetworkManager >= 1:0.8.998 for package: 1:NetworkManager-vpnc-0.8.999-2.fc15.i686
–> Processing Dependency: NetworkManager >= 1:0.8.998 for package: 1:NetworkManager-openvpn-0.8.999-1.fc15.i686
–> Processing Dependency: NetworkManager >= 1:0.8.998 for package: 1:NetworkManager-pptp-0.8.999-1.fc15.i686
–> Processing Dependency: NetworkManager for package: evolution-NetworkManager-3.0.2-3.fc15.i686
–> Running transaction check
—> Package NetworkManager-gnome.i686 1:0.8.9997-5.git20110702.fc15 will be erased
—> Package NetworkManager-openconnect.i686 0:0.8.999-1.fc15 will be erased
—> Package NetworkManager-openvpn.i686 1:0.8.999-1.fc15 will be erased
—> Package NetworkManager-pptp.i686 1:0.8.999-1.fc15 will be erased
—> Package NetworkManager-vpnc.i686 1:0.8.999-2.fc15 will be erased
—> Package evolution-NetworkManager.i686 0:3.0.2-3.fc15 will be erased
–> Finished Dependency ResolutionDependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
NetworkManager i686 1:0.8.9997-5.git20110702.fc15 @updates 5.9 M
Removing for dependencies:
NetworkManager-gnome i686 1:0.8.9997-5.git20110702.fc15 @updates 1.4 M
NetworkManager-openconnect i686 0.8.999-1.fc15 @anaconda-InstallationRepo-201105131946.i686
271 k
NetworkManager-openvpn i686 1:0.8.999-1.fc15 @anaconda-InstallationRepo-201105131946.i686
591 k
NetworkManager-pptp i686 1:0.8.999-1.fc15 @anaconda-InstallationRepo-201105131946.i686
413 k
NetworkManager-vpnc i686 1:0.8.999-2.fc15 @anaconda-InstallationRepo-201105131946.i686
387 k
evolution-NetworkManager i686 3.0.2-3.fc15 @updates 8.5 kTransaction Summary
================================================================================
Remove 7 Package(s)Installed size: 8.9 M
Is this ok [y/N]: - Untuk meng-query file atau fitur yang diinginkan terdapat pada package mana aja.
Gunakan command “yum provides/whatprovides string_file_fitur“. Contoh berikut mencari package yang provides string “mp3*”[root@anif ~]# yum provides mp3*
Loaded plugins: langpacks, presto, refresh-packagekit
mpg123-1.12.3-1.fc14.i686 : MPEG audio player
Repo : rpmfusion-free
Matched from:
Other : mp3-cmdline = 1.12.3-1.fc14mpg321-0.2.12-2.fc15.i686 : Command line MPEG audio player (fixed-point
: calculations)
Repo : rpmfusion-free
Matched from:
Other : mp3-cmdline = 0.2.12-2.fc15madplay-0.15.2b-6.fc11.i586 : MPEG audio decoder and player
Repo : rpmfusion-free
Matched from:
Other : mp3-cmdlinemp3gain-1.4.6-6.fc11.i586 : Lossless MP3 volume adjustment tool
Repo : rpmfusion-free
Matched from:
Other : mp3gain(x86-32) = 1.4.6-6.fc11
Other : mp3gain = 1.4.6-6.fc11libtunepimp-extras-freeworld-0.5.3-7.fc14.i686 : Additional plugins for
: libtunepimp
Repo : rpmfusion-free
Matched from:
Other : mp3.so - Query informasi dari sebuah package
Gunakan command “yum info package_name“[root@anif ~]# yum info ntop
Loaded plugins: langpacks, presto, refresh-packagekit
Available Packages
Name : ntop
Arch : i686
Version : 3.4
Release : 0.5.pre3.fc15
Size : 17 M
Repo : fedora
Summary : A network traffic probe similar to the UNIX top command
URL : http://www.ntop.org
License : GPLv2 and BSD with advertising
Description : ntop is a network traffic probe that shows the network usage,
: similar to what the popular top Unix command does. ntop is based
: on libpcap and it has been written in a portable way in order to
: virtually run on every Unix platform and on Win32 as well.
:
: ntop users can use a a web browser (e.g. netscape) to navigate
: through ntop (that acts as a web server) traffic information and
: get a dump of the network status. In the latter case, ntop can be
: seen as a simple RMON-like agent with an embedded web interface.
: The use of:
:
: * a web interface
: * limited configuration and administration via the web
: interface
: * reduced CPU and memory usage (they vary according to network
: size and traffic)
:
: make ntop easy to use and suitable for monitoring various kind of
: networks.
:
: ntop should be manually started the first time so that the
: administrator password can be selected. - Delete/clean cache directory
Command “yum clean options_name” akan men-delete cache file yang terdapat pada /var/cache/yum - Menginstall package yang available pada sebuah group
Gunakan command “yum groupinstall group_name“. Untuk melihat group_name gunakan command yang sudah dijelaskan sebelumnya yaitu “yum grouplist“[root@anif ~]# yum groupinstall “Perl Development”
….
perl-YAML-Syck i686 1.17-2.fc15 fedora 80 k
perl-common-sense noarch 3.3-2.fc15 fedora 23 k
perl-namespace-clean noarch 0.20-2.fc15 fedora 16 k
perl-version i686 3:0.88-3.fc15 fedora 68 kTransaction Summary
================================================================================
Install 176 Package(s)Total download size: 19 M
Installed size: 61 MCommand diatas akan menginstall total 176 package
- Query dependencies list dari sebuah package.
Untuk mengetahui sebuah package memiliki dependencies dengan apa aja gunakan “yum deplist package_name“, deplist juga akan memberitahukan package name yang menyediakan file yang dibutuhkan oleh package tersebut.[root@anif ~]# yum deplist xmms-mp3
Loaded plugins: langpacks, presto, refresh-packagekit
Finding dependencies:
package: xmms-mp3.i586 1.2.11-3.20071117cvs.fc11
dependency: libc.so.6(GLIBC_2.3.4)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libgdk-1.2.so.0
provider: gtk+.i686 1:1.2.10-71.fc15
dependency: libc.so.6(GLIBC_2.1)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libm.so.6
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libXi.so.6
provider: libXi.i686 1.4.2-1.fc15
provider: libXi.i686 1.4.3-1.fc15
dependency: libgtk-1.2.so.0
provider: gtk+.i686 1:1.2.10-71.fc15
dependency: libc.so.6(GLIBC_2.4)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: xmms-libs = 1:1.2.11
provider: xmms-libs.i686 1:1.2.11-12.20071117cvs.fc15
dependency: libm.so.6(GLIBC_2.0)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: rtld(GNU_HASH)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libgthread-1.2.so.0
provider: glib.i686 1:1.2.10-34.fc15
dependency: libpthread.so.0
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libpthread.so.0(GLIBC_2.0)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libc.so.6
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libXext.so.6
provider: libXext.i686 1.2.0-2.fc15
dependency: libc.so.6(GLIBC_2.0)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libpthread.so.0(GLIBC_2.1)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libX11.so.6
provider: libX11.i686 1.4.3-1.fc15
dependency: libglib-1.2.so.0
provider: glib.i686 1:1.2.10-34.fc15
dependency: libc.so.6(GLIBC_2.7)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
dependency: libc.so.6(GLIBC_2.1.3)
provider: glibc.i686 2.13.90-9
provider: glibc.i686 2.14-4
keren pak tutorialnya,
thanks pak, tapi saya masih newbie kok