Top 8 command for YUM package management practical guide in linux with examples for beginners
In this
article we learn how to search, install, upgrade ,remove and list a package
using yum repository and also learn how
to configure yum repository and verify the repository whether it is correctly
configured or not.
What is YUM
Yum is very
powerful tool for a system administrator to install ,update and remove a
package and automatically install its
all dependencies very fast. We can create local yum repository to install all
required packages.
Configure local repo for yum repository
If we don’t have direct internet access we can
configure local yum repo to install, upgrade and delete all our required packages. First we have to
mount iso image .To mount the iso image
we can execute the following command.
#mount
-0 loop –t iso9660 /dev/cdrom /mnt
After mount
the iso image we go to the “/etc/yum.reposd” directory and create a file called
local.repo and configure the local repo like this.
Top 8 command for YUM package management practical guide in linux with examples for beginners |
Top 8 command for yum package management
1)To check
the repolist we execute the below command.
[root@localhost
yum.repos.d]# yum repolist
Loaded plugins:
product-id, subscription-manager
This system is not
registered to Red Hat Subscription Management. You can use subscription-manager
to register.
repo id
repo name
status
epel
Extra Packages for Enterprise Linux 6 - x86_64
12,515
local
local repo
3,690
repolist: 16,205
2)If we don’t know the package name we
can search the package by execute the following package.
[root@localhost
yum.repos.d]# yum search httpd
Loaded
plugins: product-id, subscription-manager
This
system is not registered to Red Hat Subscription Management. You can use
subscription-manager to register.
==========================================================================
N/S Matched: httpd
==========================================================================
iipsrv-httpd-fcgi.noarch
: Apache HTTPD files for iipsrv
lighttpd-fastcgi.x86_64
: FastCGI module and spawning helper for lighttpd and PHP configuration
lighttpd-mod_authn_gssapi.x86_64
: Authentication module for lighttpd that uses GSSAPI
lighttpd-mod_authn_mysql.x86_64
: Authentication module for lighttpd that uses a MySQL database
lighttpd-mod_geoip.x86_64
: GeoIP module for lighttpd to use for location lookups
lighttpd-mod_mysql_vhost.x86_64
: Virtual host module for lighttpd that uses a MySQL database
httpd.x86_64
: Apache HTTP Server
httpd-devel.i686
: Development interfaces for the Apache HTTP server
httpd-devel.x86_64
: Development interfaces for the Apache HTTP server
httpd-itk.x86_64
: MPM Itk for Apache HTTP Server
httpd-manual.noarch
: Documentation for the Apache HTTP server
httpd-tools.x86_64
: Tools for use with the Apache HTTP Server
lighttpd.x86_64
: Lightning fast webserver with light system requirements
mirmon-httpd.noarch
: Apache configuration for mirmon
mod_dav_svn.x86_64
: Apache httpd module for Subversion server
mod_dnssd.x86_64
: An Apache HTTPD module which adds Zeroconf support
python-mozhttpd.noarch
: Basic Python webserver
python2-sphinxcontrib-httpdomain.noarch
: Sphinx domain for documenting HTTP APIs
sysusage-httpd.noarch
: Apache configuration for sysusage
viewvc-httpd.noarch
: ViewVC configuration for Apache/mod_python
web-assets-httpd.noarch
: Web Assets aliases for the Apache HTTP daemon
Name and summary matches only, use
"search all" for everything.
3)To install the
required package we can execute the following commad. At that time it will
install all dependencies for the httpd package automatically .
If we use “-y” switch
at the end of the command it don’t ask for confirmation it will do everything
automatically.
[root@localhost yum.repos.d]# yum install
http*
Loaded
plugins: product-id, subscription-manager
This
system is not registered to Red Hat Subscription Management. You can use
subscription-manager to register.
local |
3.9 kB 00:00 ...
Setting
up Install Process
Resolving
Dependencies
-->
Running transaction check
--->
Package http-parser.x86_64 0:2.0-4.20121128gitcd01361.el6 will be installed
--->
Package http-parser-devel.x86_64 0:2.0-4.20121128gitcd01361.el6 will be
installed
--->
Package httpd.x86_64 0:2.2.15-29.el6_4 will be installed
-->
Processing Dependency: apr-util-ldap for package: httpd-2.2.15-29.el6_4.x86_64
-->
Processing Dependency: /etc/mime.types for package:
httpd-2.2.15-29.el6_4.x86_64
-->
Processing Dependency: libaprutil-1.so.0()(64bit) for package:
httpd-2.2.15-29.el6_4.x86_64
-->
Processing Dependency: libapr-1.so.0()(64bit) for package:
httpd-2.2.15-29.el6_4.x86_64
--->
Package httpd-devel.x86_64 0:2.2.15-29.el6_4 will be installed
To install the group
package we put the word “groupinstall” instead the install like this.
#yum
groupinstall “development tool”
4)To update the package
we need to execute the below command
#yum
update httpd
To update the the
version of the system operating system we need to execute “yum update” command.
5)To remove the package
we need to execute the below command.
#yum
remove httpd
6)To remove the yum
cache we need to execute the below command.
#yum
clean all
7)To check all available
list for a particular package we can execute the below command.
#yum
provides httpd
8)If update is available
or not we execute the below command .
#yum
check-update
Please Donate To Bitcoin Address: [[address]]
Donation of [[value]] BTC Received. Thank You.
[[error]]
0 comments:
Post a Comment