Linux and Unix tutorials for new and seasoned sysadmin.
yum command: Update / Install Packages Under Redhat Enterprise / CentOS Linux Version 5.x
How do I use yum command to update and patch my Red hat Enterprise Linux / CentOS Linux version 5.x server via RHN / Internet? Can I use up2date command under RHEL 5?
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.
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:
Find out if httpd package installed or not, 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:
Sample output:
# 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:
Output:
# 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:
Sample output:
# 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:
Sample output:
# 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:
Refer yum command man page for more information:
# yum whatprovides {dependency-1} {dependency-2}
Refer yum command man page for more information:
# man yum
When am booting into os, It coming up with an error
Cant find x-server, Try to install x-server….
and then it going to text mode for a min and throwing that error
Can any one help me plssss
When am booting into os, It coming up with an error
Cant find x-server, Try to install x-server….
and then it going to text mode for a min and throwing that error
Can any one help me plssss
how r u,
your problem is booting error
because u system unintall x-server. so pls install the x-server,
ok
if you want to install linux or fedora or centos first of all you set a bois setup to first set a cdrom to select for booting process then restart your system and then press f9 then automatically to process for a next version installation.
name=Red Hat Local Repository
baseurl=file:///media/RHEL_5.3%20i386%20DVD/Server
enabled=1
gpgcheck=0
this is to better commands of other command
bcoz another commands are so hard it is true
and this commands is very simple .
bye tc , have good day all .
the error show, when i insert a disk of film in dvdrom then the error shows
stp1- cp /etc/yum.repos.d/rhel(press tab) /etc/yum.repos.d/Server.repo
stp2- vi /etc/yum.reppos.d/Server.repo
stp3- in 3rd lin after ftp giv //ur machine ip/pub/Server (becz my Server is copy 2 pub)
stp4- createrepo -v /var/ftp/pub/Server
stp5- service vsftpd restart
stp6- yum update
thank u i am 2nd year eng student
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
verify that the module is installed correctly.
current version of Python, which is:
2.4.3 (#1, Jan 14 2008, 18:32:40)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
great……………….
I am having dell inspiron 1525 and have problem in running wifi , so can yum help me to install my wifi drivers compatible to my machine.
I am having dell latitude 510 lappy and having a problem in running wifi, so can u help me hou to install the wifi drivers tat r compatible to my machine
your team…
I’ve even configured YUM but still I think there is something to know that I don’t so please some body help me ………….
plzzzzzzzzzzzzzz
yum install vlc* for centos,redhat,
sudo apt-get install vlc* for ubauntu
Santosh
What is the command to add a YUM service on RHEL agent?
Santosh
I installed first on Ubuntu9.10 (unfortunately not all modules works fine) and installation it was ok, and I tested and everything works done. After that I try to install it on CentOS because this software is made to works done only on Rhel platform (.rpm). So, I encountered the next message, which I don’t understand what means and why appear:
>password
>./INSTALL
>bash: ./INSTALL: /bin/sh: bad interpreter: Permission denied
>password
>rpm -i INSTALL
>password
>sudo ./INSTALL
sudo: unable to execute ./INSTALL: Success
This install method typically involves:
>./configure
>./make
>./make install
> cat ./INSTALL |less
# ./configure
# make
# make install
You can try issuing 3rd party repositories on RH/CentOS such as EPEL, RPMFusion are two good choices, these might have more recent version of your software but remember that RH/CentOS are more geared for stability rather than bleeding edge. In that case you can try Fedora.
Excuse me for my english.
I am using CentOS5.5 and I want to install few packages through yum.
package available.
the guide suggests doing this:
yum whatprovides gnome-libs
” yum whatprovides screen”
but it shows this error :
” Warning: 3.0.x versions of yum would erroneously match against filenames.
You can use “*/screen” and/or “*bin/screen” to get that behaviour
No Matches found”
I use ” yum whatprovides */screen ”
” ncurses-5.5-24.20060715.i386 : A terminal handling library
Repo : Rocks-5.4
Matched from:
Filename : /usr/share/terminfo/s/screen”
“-bash: screen: command not found”
“Rocks-5.4/filelists | 1.4 MB 00:00
No Matches found”
Thanks in advance.
you can download this rpm from this site
http://rpm.pbone.net/index.php3/stat/4/idpl/15801214/dir/centos_5/com/screen-4.0.3-4.el5.x86_64.rpm.html
yum install screen
100 Linux servers which are part of production, doesn’t have access to internet. It’s in private DMZ. YUM will not work here. How would you install the latest patches?
Have a look at RHN Proxy Server,
http://www.redhat.com/red_hat_network/faq/
It allows you to cache rpms internally and distribute them to your local network.
thank you in advance. I really need your help.. :D
I am using RHEL 5 and I want to install few packages whit yum.
no package available.
i’m install netconfig with using of yum : yum install netconfig.
but i cant use netconfig and i dont find related file.i want to know how to i can use netconfig.
thank so much and excuse for bad language.
i’m install vlc player with using rpm commands but i can’t install vlc because this error has occured so pls help me
[root@senthil ~]# rpm -ivh /home/senthil/Desktop/gstreamer-ffmpeg-0.10.11-1.fc14.src.rpm
warning: /home/senthil/Desktop/gstreamer-ffmpeg-0.10.11-1.fc14.src.rpm: Header V3 RSA/SHA256 Signature, key ID 865cc9ea: NOKEY
1:gstreamer-ffmpeg warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
########################################### [100%]
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
plase login user root.then u try
(e.g. the user ‘mockbuild’ not existing, so it’s using root)
Your (source) RPM has been installed. You might want to install the binary RPM, however. The source RPM is only going to contain the source code, which isn’t going to help you unless you’re compiling it for some custom use.
i’am makarim come from indonesia…
i have installed RHEL 5.7 and Oracle 10.02g (64 bit)
i will install apache and php5,, can you help me step by step how to install it ?
I am having problem with my wifi connection. It is of Broadcom. but Linux Enterprize 5 always give error for dhcp at startup and i have tried a lot to configure my wifi setting manually but i am not successful in doing so. so please help me , i am new to linux and i am self lerner
i want to give superuser power to redhat user, how to do it???
Its shows error: 502. i guess its related to DNS server settings.. can u help me out..
Loading “rhnplugin” plugin
Loading “installonlyn” plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up repositories
http://apt.sw.be/redhat/el5Server/en/i386/dag/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: dag
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security, subscription-manager,
: tmprepo, verify, versionlock
Updating certificate-based repositories.
Loading support for Red Hat kernel ABI
Setting up Install Process
No package gnuchess available.
Error: Nothing to do
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4AS – x86_64 – Base
retrygrab() failed for:
http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4AS/x86_64/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://mirror.dulug.duke.edu/pub/yum-repository/redhat/4AS/x86_64/headers/header.info
[Errno 4] IOError:
I am shariq
I’m learning Linux and i have two users in my rhel6 root and redhat users.
i want to give superuser power to redhat user, how to do it???
I am using ‘Amazon Linux AMI release 2014.03’ micro instance. can anyone tell me, why extra packages not install on this machine after epel configured.
but error is showing “no package avalaible”
what to do?
buz without this activation i’m not able to configure yum