Showing posts with label YUM. Show all posts
Showing posts with label YUM. Show all posts

Yum Repositories

yum install yum-priorities 
Repositories listed in order of reliability:

epel

Install Repository: Install Key:
rpm --import http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL
Verify repository package: you should get "(sha1) dsa sha1 md5 gpg OK"
rpm -K http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
Install Repository:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm

rpmfusion

Install epel and enable epel-testing at this time. Most packages are still in rpmfusion testing repository
rpm --import 
rpm -ivh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm
rpm -ivh http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm

rpmforge

Installing repository:
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm -K http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
rpm -Uvh http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

adobe

rpm -Uvh adobe-release-i386-1.0-1.noarch.rpm

atrpms

/etc/yum.repos.d/atrpms.repo
[atrpms-stable]
name=RedHat Enterprise $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
       http://www.mirrorservice.org/sites/download.atrpms.net/el$releasever-$basearch/atrpms/stable/
       http://mirrors.ircam.fr/pub/atrpms/el$releasever-$basearch/atrpms/stable/
       http://ftp-stud.fht-esslingen.de/atrpms/dl.atrpms.net/el$releasever-$basearch/atrpms/stable/
       http://fedora.univ-nantes.fr/dl.atrpms.net/el$releasever-$basearch/atrpms/stable/
       http://wftp.tu-chemnitz.de/pub/linux/ATrpms/el$releasever-$basearch/atrpms/stable/
failovermethod=priority
enabled=1
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
protect=0

El Repo


karan

appears to have no major packages for rhel5 at this time
cd /etc/yum.repos.d/
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
wget http://centos.karan.org/kbsingh-CentOS-Misc.repo
add "protect=0" to these repositories
rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
Also read: http://www.karan.org/blog/

jpackage

http://www.jpackage.org/

future

RPMrepo: http://rpmrepo.org/ - merger of rpmforge and atrpms
RPMfusion: http://rpmfusion.org/ - merger of livna, freshrpms, and dribble

other

Atomic Rocket Turtle
jason litka

yum command: Update / Install Packages Under Redhat Enterprise / CentOS Linux Version 5.x


up2date command was part of RHEL v4.x or older version. You need to use yum command to update and patch the system using RHN or Internet. Use yum command to install critical and non-critical security updates as well as binary packages. Login as the root user to install and update the system.

Task: Register my system with RHN

To register your system with RHN type the following command and just follow on screen instructions (CentOS user skip to next step):
# rhn_register
WARNING! These examples only works with RHEL / CentOS Linux version 5.x or above. For RHEL 4.x and older version use up2date command.

Task: Display list of updated software (security fix)

Type the following command at shell prompt:
# yum list updates

Task: Patch up system by applying all updates

To download and install all updates type the following command:
# yum update

Task: List all installed packages

List all installed packages, enter:
# rpm -qa
# yum list installed

Find out if httpd package installed or not, enter:
# rpm -qa | grep httpd*
# yum list installed httpd

Task: Check for and update specified packages

# yum update {package-name-1}
To check for and update httpd package, enter:
# yum update httpd

Task: Search for packages by name

Search httpd and all matching perl packages, enter:
# yum list {package-name}
# yum list {regex}
# yum list httpd
# yum list perl*

Sample output:
Loading "installonlyn" plugin
Loading "security" plugin
Setting up repositories
Reading repository metadata in from local files
Installed Packages
perl.i386                                4:5.8.8-10.el5_0.2     installed
perl-Archive-Tar.noarch                  1.30-1.fc6             installed
perl-BSD-Resource.i386                   1.28-1.fc6.1           installed
perl-Compress-Zlib.i386                  1.42-1.fc6             installed
perl-DBD-MySQL.i386                      3.0007-1.fc6           installed
perl-DBI.i386                            1.52-1.fc6             installed
perl-Digest-HMAC.noarch                  1.01-15                installed
perl-Digest-SHA1.i386                    2.11-1.2.1             installed
perl-HTML-Parser.i386                    3.55-1.fc6             installed
.....
.......
..
perl-libxml-perl.noarch                  0.08-1.2.1             base
perl-suidperl.i386                       4:5.8.8-10.el5_0.2     updates 

Task: Install the specified packages [ RPM(s) ]

Install package called httpd:
# yum install {package-name-1} {package-name-2}
# yum install httpd

Task: Remove / Uninstall the specified packages [ RPM(s) ]

Remove package called httpd, enter:
# yum remove {package-name-1} {package-name-2}
# yum remove httpd

Task: Display the list of available packages

# yum list all

Task: Display list of group software

Type the following command:
# yum grouplist
Output:
Installed Groups:
   Engineering and Scientific
   MySQL Database
   Editors
   System Tools
   Text-based Internet
   Legacy Network Server
   DNS Name Server
   Dialup Networking Support
   FTP Server
   Network Servers
   Legacy Software Development
   Legacy Software Support
   Development Libraries
   Graphics
   Web Server
   Ruby
   Printing Support
   Mail Server
   Server Configuration Tools
   PostgreSQL Database
Available Groups:
   Office/Productivity
   Administration Tools
   Beagle
   Development Tools
   GNOME Software Development
   X Software Development
   Virtualization
   GNOME Desktop Environment
   Authoring and Publishing
   Mono
   Games and Entertainment
   XFCE-4.4
   Tomboy
   Java
   Java Development
   Emacs
   X Window System
   Windows File Server
   KDE Software Development
   KDE (K Desktop Environment)
   Horde
   Sound and Video
   FreeNX and NX
   News Server
   Yum Utilities
   Graphical Internet
Done

Task: Install all the default packages by group

Install all 'Development Tools' group packages, enter:
# yum groupinstall "Development Tools"

Task: Update all the default packages by group

Update all 'Development Tools' group packages, enter:
# yum groupupdate "Development Tools"

Task: Remove all packages in a group

Remove all 'Development Tools' group packages, enter:
# yum groupremove "Development Tools"

Task: Install particular architecture package

If you are using 64 bit RHEL version it is possible to install 32 packages:
# yum install {package-name}.{architecture}
# yum install mysql.i386

Task: Display packages not installed via official RHN subscribed repos

Show all packages not available via subscribed channels or repositories i.e show packages installed via other repos:
# yum list extras
Sample output:
Loading "installonlyn" plugin
Loading "security" plugin
Setting up repositories
Reading repository metadata in from local files
Extra Packages
DenyHosts.noarch                         2.6-python2.4          installed
VMwareTools.i386                         6532-44356             installed
john.i386                                1.7.0.2-3.el5.rf       installed
kernel.i686                              2.6.18-8.1.15.el5      installed
kernel-devel.i686                        2.6.18-8.1.15.el5      installed
lighttpd.i386                            1.4.18-1.el5.rf        installed
lighttpd-fastcgi.i386                    1.4.18-1.el5.rf        installed
psad.i386                                2.1-1                  installed
rssh.i386                                2.3.2-1.2.el5.rf       installed

Task: Display what package provides the file

You can easily find out what RPM package provides the file. For example find out what provides the /etc/passwd file:
# yum whatprovides /etc/passwd
Sample output:
Loading "installonlyn" plugin
Loading "security" plugin
Setting up repositories
Reading repository metadata in from local files

setup.noarch                             2.5.58-1.el5           base
Matched from:
/etc/passwd

setup.noarch                             2.5.58-1.el5           installed
Matched from:
/etc/passwd
You can use same command to list packages that satisfy dependencies:
# yum whatprovides {dependency-1} {dependency-2}
Refer yum command man page for more information:
# man yum

YUM tutorial.

YUM stands for 'Yellowdog Updater Modified'. YellowDog Linux is a rpm based distribution of Linux created for the ppc architecture. Fedora Core took up this package manager as of Fedora Core 1.
Leaving history aside, yum is the easiest way to install, update, and remove software from your Linux systems. This quick tutorial guides you through the steps but it is not a substitute for man yum. This tutorial would give you general usage while man page give a comprehensive documentation of yum's functionality. An added benefit of yum is that it calculates a programs dependencies and then it downloads and installs them for you.

Installing Yum

Before installing yum, check to see if you already have yum installed:
$ whereis yum
If you don't have yum installed, you can download it from http://yum.baseurl.org. To install yum,
$ rpm -Uvh yum-xx.noarch.rpm

Is a software already installed on my system

$ yum list install SOFTWARE
$ yum list install firefox
replace the word software with your software.

Installing with yum

$ yum install SOFTWARE
$ yum install firefox
replace the word software with your software.
This will get all the dependencies and prompt you with a list of dependencies you need to download and install. You can accept or decline.

Search for software

$ yum search STRING
$ yum search firefox
$ yum search fire*
where string could be software's name, or a wildcard. Yum would return a list of matches.

Uninstalling software

$ yum remove PACKAGE
$ yum remove firefox

Updating software

$ yum update PACKAGE
$ yum update firefox

How To Download a RPM Package Using yum Command Without Installing On Linux




Q. I would like to only download the packages via yum and not install/update them. How do I download a RPM package using yum command under CentOS Enterprise Linux server 5.x or RHEL 5.x systems?

A. You need to install plugin called yum-downloadonly. This plugin adds a --downloadonly flag to yum so that yum will only download the packages and not install/update them. Following options supported by this plugin:
[a] --downloadonly : don't update, just download a rpm file
[b] --downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp
Please note following instructions are only tested on CentOS server but should work with RHN and RHEL without any problem.

How do I install yum-downloadonly plugin?

Type the following command to install plugin, enter:
# yum install yum-downloadonly
Sample output:
Loading "fastestmirror" plugin
Loading "security" plugin
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.tds.net
 * updates: mirror.myriadnetwork.com
 * addons: mirrors.gigenet.com
 * extras: holmes.umflint.edu
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package yum-downloadonly.noarch 0:1.1.10-9.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 yum-downloadonly        noarch     1.1.10-9.el5.centos  base              9.0 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)         

Total download size: 9.0 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): yum-downloadonly-1 100% |=========================| 9.0 kB    00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: yum-downloadonly             ######################### [1/1] 

Installed: yum-downloadonly.noarch 0:1.1.10-9.el5.centos
Complete!

How do I download a RPM package only from RHN or CentOS mirror, without installing it?

Download httpd package but don't install/update, enter:
# yum update httpd -y --downloadonly
By default package will by downloaded and stored in /var/cache/yum/ directory. But, you can specifies an alternate directory to store packages such as /opt, enter:
# yum update httpd -y --downloadonly --downloaddir=/opt

If the package is already Installed on system then use this......... 

# yum install  httpd --downloadonly --downloaddir=/mnt --installroot=/tmp