Rabu, 14 Maret 2012

Penggunaan perintah yum

Seri SBL-CL ( Seri Belajar Linux Command Line ) kali tidak saya buat pdf tapi berupa postingan saja karena materinya tidak begitu banyak. Agak berbeda dengan perintah apt-get update yang sering kita temukan di ubuntu atau debian , maka fedora, redhat , centos dan keluarganya memakai perintah yum.
1. Menginstall tools atau paket dari repositori
Misalnya saya ingin menginstall gimp dengan menggunakan yum..

[zee@zee ~]$ sudo yum install gimp
 Loaded plugins: langpacks, presto, refresh-packagekit
 Setting up Install Process
 Resolving Dependencies
 --> Running transaction check
 ---> Package gimp.i686 2:2.6.11-21.fc15 will be installed
 --> Processing Dependency: gimp-libs(x86-32) = 2:2.6.11-21.fc15 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpbase-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpwidgets-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpcolor-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimp-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpui-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpthumb-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libwmflite-0.2.so.7 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libbabl-0.1.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpmodule-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgimpconfig-2.0.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libwmf-0.2.so.7 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libmng.so.1 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libgegl-0.1.so.0 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency: libaa.so.1 for package: 2:gimp-2.6.11-21.fc15.i686
 --> Processing Dependency.....
Jika kita hendak mengisntall program dari repository tanpa pertanyaan2 persetujuan kita bisa gunakan opsi -y
2. Meremove paket/software dengan yum
[zee@zee ~]$ sudo yum remove postgresql-8.4
 Loaded plugins: langpacks, presto, refresh-packagekit
 Setting up Remove Process
 Resolving Dependencies
 --> Running transaction check
 ---> Package postgresql.i686 0:9.0.6-1.fc15 will be erased
 --> Finished Dependency Resolution
 Dependencies Resolved
 ================================================================================
 Package Arch Version Repository Size
 ================================================================================
 Removing:
 postgresql i686 9.0.6-1.fc15 @updates 14 M
 Transaction Summary
 ================================================================================
 Remove 1 Package(s)
 Installed size: 14 M
 Is this ok [y/N]:
3. Mengupdate paket/software dengan yum
Misal saya hendak mengupdate gimp
yum update gimp
[zee@zee ~]$ sudo yum update gimp
 [sudo] password for zee:
 Loaded plugins: langpacks, presto, refresh-packagekit
 Setting up Update Process
4. Mencari paket-paket yang tersedia di repository dengan menggunakan keyword tertentu
Pada contoh di bawah saya mencari paket-paket pada repositori yang berbau virtualbox
[zee@zee ~]$ sudo yum search virtualbox
 Loaded plugins: langpacks, presto, refresh-packagekit
 updates/pkgtags | 62 kB 00:01
 =========================== N/S Matched: virtualbox ============================
 VirtualBox-OSE-devel.i686 : VirtualBox-OSE SDK
 VirtualBox-OSE-guest.i686 : VirtualBox-OSE Guest Additions
 VirtualBox-OSE-kmodsrc.i686 : VirtualBox-OSE kernel module source code
 akmod-VirtualBox-OSE.i686 : Akmod package for VirtualBox-OSE kernel module(s)
 kmod-VirtualBox-OSE.i686 : Metapackage which tracks in VirtualBox-OSE kernel
 : module for newest kernel
 kmod-VirtualBox-OSE-2.6.38.6-26.rc1.fc15.i686.i686 : VirtualBox-OSE kernel
 ...: module(s) for 2.6.38.6-26.rc1.fc15.i686
 kmod-VirtualBox-OSE-2.6.38.6-26.rc1.fc15.i686.PAE.i686 : VirtualBox-OSE kernel
 ...: module(s) for 2.6.38.6-26.rc1.fc15.i686.PAE
 kmod-VirtualBox-OSE-2.6.38.6-27.fc15.i686.i686 : VirtualBox-OSE kernel module(s)
 : for 2.6.38.6-27.fc15.i686
 kmod-VirtualBox-OSE-......
 python-VirtualBox-OSE.i686 : Python bindings for VirtualBox-OSE
 VirtualBox-OSE.i686 : A general-purpose full virtualizer for PC hardware
 Name and summary matches only, use "search all" for everything.
5. Melihat informasi paket/software yang dinginkan
Sebagai contoh saya mencari informasi mengenai paket vlc
 [zee@zee ~]$ sudo yum info vlc
 Loaded plugins: langpacks, presto, refresh-packagekit
 Available Packages
 Name : vlc
 Arch : i686
 Version : 1.1.12
 Release : 1.fc15
 Size : 1.9 M
 Repo : rpmfusion-free-updates
 Summary : The cross-platform open-source multimedia framework, player and
 : server
 URL : http://www.videolan.org
 License : GPLv2+
 Description : VLC media player is a highly portable multimedia player and
 : multimedia framework capable of reading most audio and video
 : formats as well as DVDs, Audio CDs VCDs, and various streaming
 : protocols. It can also be used as a media converter or a server to
 : stream in uni-cast or multi-cast in IPv4 or IPv6 on networks.
6. Melihat semua paket yang tersedia di repository
[zee@zee ~]$ sudo yum list | less
7. Melihat semua paket yang terinstall
[zee@zee ~]$ sudo yum list installed | less
8. Melihat informasi kepemilikan file
Kita dapat melihat dari paket atau program manakah file tersebut , misalnya saya mencari tau tentang file yang berada pada /etc/init.d/sshd
[zee@zee ~]$ yum provides /etc/init.d/sshd
 Loaded plugins: langpacks, presto, refresh-packagekit
 openssh-server-5.6p1-34.fc15.1.i686 : An open source SSH server daemon
 Repo : installed
 Matched from:
 Other : Provides-match: /etc/init.d/sshd
9. Melihat paket atau tools yang memiliki kepemilikan group tertentu
[zee@zee ~]$ sudo yum grouplist
 Freeing read locks for locker 0x99: 3540/3077777088
 Freeing read locks for locker 0x9b: 3540/3077777088
 Loaded plugins: langpacks, presto, refresh-packagekit
 Setting up Group Process
 rpmfusion-free-updates | 3.3 kB 00:00
 rpmfusion-nonfree-updates | 3.3 kB 00:00
 updates/metalink | 4.0 kB 00:00
 updates | 4.7 kB 00:00
 updates/primary_db | 4.7 MB 00:57
 updates/group_gz | 430 kB 00:18
 Installed Groups:
 Administration Tools
 Design Suite
 Dial-up Networking Support
 Engineering and Scientific
 Fonts
 GNOME Desktop Environment
 Games and Entertainment
 Graphical Internet
 Graphics
 Hardware Support
 Input Methods
 Legacy Fonts
 Mail Server
 Network Servers
 Office/Productivity
 Printing Support
 Ruby
 Server Configuration Tools
 Sound and Video
 System Tools
 Text-based Internet
 Window Managers
 X Window System
 Installed Language Groups:
 Arabic Support [ar]
 Armenian Support [hy]
 Assamese Support [as]
 Bengali Support [bn]
 Bhutanese Support [dz]
 Ethiopic Support [am]
 Georgian Support [ka]
 Gujarati Support [gu]
 Hebrew Support [he]
 Hindi Support [hi]
 Inuktitut Support [iu]
 Japanese Support [ja]
 Kannada Support [kn]
 Kashmiri Support [ks]
 Khmer Support [km]
 Konkani Support [kok]
 Korean Support [ko]
 Lao Support [lo]
 Maithili Support [mai]
 Malayalam Support [ml]
 Marathi Support [mr]
 Myanmar (Burmese) Support [my]
 Oriya Support [or]
 Punjabi Support [pa]
 Russian Support [ru]
 Sanskrit Support [sa]
 Simplified Chinese Support [zh_CN]
 Sindhi Support [sd]
 Sinhala Support [si]
 Tajik Support [tg]
 Tamil Support [ta]
 Telugu Support [te]
 Thai Support [th]
 Traditional Chinese Support [zh_TW]
 Urdu Support [ur]
 Venda Support [ve]
 Yiddish Support [yi]
 Available Groups:
 Authoring and Publishing
 Base
 Books and Guides
 Clustering
 DNS Name Server
 Development Libraries
 Development Tools
 Directory Server
 Dogtag Certificate System
 Editors
 Educational Software
 Electronic Lab
 FTP Server
 Fedora Eclipse
 Fedora Packager
 Font design and packaging
 GNOME Software Development
 Haskell
 Java
 Java Development
 KDE Software Compilation
 KDE Software Development
 LXDE
 Legacy Network Server
 Legacy Software Development
 LibreOffice Development
 MeeGo NetBook UX Environment
 Milkymist
 MinGW cross-compiler
 MySQL Database
 News Server
 OCaml
 Perl Development
 PostgreSQL Database
 Robotics
 Somali Support
 Sugar Desktop Environment
 Virtualization
 Web Development
 Web Server
 Windows File Server
 X Software Development
 XFCE Software Development
 Xfce
 Available Language Groups:
 Afrikaans Support [af]
 Akan Support [ak]
 Albanian Support [sq]
 Amazigh Support [ber]
 Asturian Support [ast]
 Azerbaijani Support [az]
 Basque Support [eu]
 Belarusian Support [be]
 Bosnian Support [bs]
 Brazilian Portuguese Support [pt_BR]
 Breton Support [br]
 Bulgarian Support [bg]
 Catalan Support [ca]
 Chichewa Support [ny]
 Chuvash Support [cv]
 Coptic Support [cop]
 Croatian Support [hr]
 Czech Support [cs]
 Danish Support [da]
 Dutch Support [nl]
 English (UK) Support [en_GB]
 Esperanto Support [eo]
 Estonian Support [et]
 Faroese Support [fo]
 Fijian Support [fj]
 Filipino Support [fil]
 Finnish Support [fi]
 French Support [fr]
 Frisian Support [fy]
 Friulian Support [fur]
 Gaelic Support [gd]
 Galician Support [gl]
 German Support [de]....
 Done
10. Mengisntall group paket tertentu
[zee@zee ~]$ yum groupinstall 'DNS Name Server'
 Dependencies Resolved
 Install 2 Package(s)
 Is this ok [y/N]: y
 Package(s) data still to download: 3.6 M
 (1/2): bind-9.8.0-9.P4.fc15.x86_64.rpm | 3.6 MB 00:15
 (2/2): bind-chroot-9.8.0-9.P4.fc15.x86_64.rpm | 69 kB 00:00
 -----------------------------------------------------------------
 Total 235 kB/s | 3.6 MB 00:15
 Installed:
 bind-chroot.x86_64 32:9.8.0-9.P4.fc15
 Dependency Installed:
 bind.x86_64 32:9.8.0-9.P4.fc15
 Complete!
11. Upgrade paket group
[zee@zee ~]$ yum groupupdate 'Graphical Internet'
 Dependencies Resolved
 Upgrade 5 Package(s)
 Is this ok [y/N]: y
 Running Transaction
 Updating : evolution-data-server-3.0.2-1.fc15.x86_64 1/10
 Updating : evolution-3.0.2-3.fc15.x86_64 2/10
 Updating : evolution-NetworkManager-3.0.2-3.fc15.x86_64 3/10
 Updating : evolution-help-3.0.2-3.fc15.noarch 4/10
 Updating : empathy-3.0.2-3.fc15.x86_64 5/10
 Cleanup : evolution-NetworkManager-3.0.1-1.fc15.x86_64 6/10
 Cleanup : evolution-help-3.0.1-1.fc15.noarch 7/10
 Cleanup : evolution-3.0.1-1.fc15.x86_64 8/10
 Cleanup : empathy-3.0.1-3.fc15.x86_64 9/10
 Cleanup : evolution-data-server-3.0.1-1.fc15.x86_64 10/10
 Complete!
12. Meremove / uninstall paket berdasarkan group
[zee@zee ~]$ yum groupremove 'DNS Name Server'
 Dependencies Resolved
 Remove 2 Package(s)
 Is this ok [y/N]: y
 Running Transaction
 Erasing : 32:bind-chroot-9.8.0-9.P4.fc15.x86_64 1/2
 Erasing : 32:bind-9.8.0-9.P4.fc15.x86_64 2/2
 Complete!
13. Menampilkan daftar repository
[zee@zee ~]$ sudo yum repolist
 [sudo] password for zee:
 Loaded plugins: langpacks, presto, refresh-packagekit
 repo id repo name status
 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 618
 rpmfusion-nonfree RPM Fusion for Fedora 15 - Nonfree 160
 rpmfusion-nonfree-updates RPM Fusion for Fedora 15 - Nonfree - Updates 307
 updates Fedora 15 - i386 - Updates 6,775
 repolist: 27,595
Jika kita hendak menampilkan semua repo baik yang kita aktifkan ( enabled ) maupun tidak
[zee@zee ~]$ sudo yum repolist all
 Loaded plugins: langpacks, presto, refresh-packagekit
 repo id repo name status
 fedora Fedora 15 - i386 enabled: 19,365
 fedora-debuginfo Fedora 15 - i386 - D disabled
 fedora-source Fedora 15 - Source disabled
 rpmfusion-free RPM Fusion for Fedor enabled: 370
 rpmfusion-free-debuginfo RPM Fusion for Fedor disabled
 rpmfusion-free-rawhide RPM Fusion for Fedor disabled
 rpmfusion-free..... 
updates-testing-source Fedora 15 - Test Upd disabled
 repolist: 27,595
14. Menginstall paket dari repo berstatus disabled
kita bisa menginstall paket dari repo yang kita disabled ( non-aktif )
[zee@zee ~]$ yum --enablerepo=fedora-source install vim-X11.x86_64
 Dependencies Resolved
 Install 1 Package(s)
 Is this ok [y/N]: y
 Running Transaction
 Installing : 2:vim-X11-7.3.138-1.fc15.x86_64 1/1
 Complete!
15. Yum Shell
Memainkan perintah yum dari yum shell
[zee@zee ~]$ sudo yum shell
 Loaded plugins: langpacks, presto, refresh-packagekit
 Setting up Yum Shell
 > info gimp
 Installed Packages
 Name : gimp
 Arch : i686
 Epoch : 2
 Version : 2.6.11
 Release : 21.fc15
 Size : 46 M
 Repo : installed
 From repo : updates
 Summary : GNU Image Manipulation Program
 URL : http://www.gimp.org/
 License : GPLv2+
 Description : GIMP (GNU Image Manipulation Program) is a powerful image
 : composition and editing program, which can be extremely useful for
 : creating logos and other graphics for webpages. GIMP has many of
 : the tools and filters you would expect to find in similar
 : commercial offerings, and some interesting extras as well. GIMP
 : provides a large image manipulation toolbox, including channel
 : operations and layers, effects, sub-pixel imaging and
 : anti-aliasing, and conversions, all with multi-level undo.
 >
Semoga berguna kawan-kawan …

Tidak ada komentar:

Posting Komentar