Вы находитесь на странице: 1из 11

Diaster Recovery approach for network Ttraffic redirection

Red Hat - Software Management


July 2014
raj janwa

Red Hat - Software Management


Topics

YUM Server Configuration File


YUM Server Setup
Basics YUM Commands
Managing YUM Components Groups
Handling Third-Party Softwares
Using YUM to install Local Package Files

3
5
7
8
9
10

1. YUM Server Configuration File

To configure repo file for packages installation, just create the repo file in
following manner:

# vi /etc/yum.repos.d/ packages.repo
[Server]
name=Redhat Packages
baseurl=file:///var/ftp/pub/
enabled=1
gpgcheck=0

[HA]
name=Redhat HA
baseurl=file:///var/ftp/pub/HighAvailability
enabled=1
gpgcheck=0

Note: /var/ftp/pub is the directory where you have to copy entire RHEL6.2 DVD

OR
# vi /etc/yum.repos.d/ packages.repo
[Server]
name=Server
baseurl=ftp://10.4.237.11/pub
enabled=1
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=ftp://10.4.237.11/pub/HighAvailability
enabled=1
gpgcheck=0

2. Yum Server Setup


Following are the steps to configure YUM server
Step :1 Place all the packages to a location where you want to or have space.

Step :2 Install a rpm package named createrepo.

Step :3 now use createrepo command to create a new folder repodata.

Step :4 now in yum server configuration file, given the absolute path location
to baseurl parameter with argument file.

Step :5 check with yum repolist command.

3. Basic Yum Commands


Yum is a powerful command line tool that can be used to more flexibly manage
software packages.

yum help will displays usage information.


yum list displays installed and available Packages.
yum search keyword lists packages by keyword.
yum info package-name gives detailed information about a packages.
yum install package-name obtains and installs a software package,

including any dependencies.


yum remove package-name removes an installed package, including

any supported packages.


yum update package-name obtains and installs a newer version of the

installed package, including any dependencies.


yum provides path-name displays packages that match the path-name

specified.

4. Managing YUM Component Groups


Yum also has the concept of component groups, which are collections of related
software grouped around a particular solution.

yum grouplist displays list of all available groups.


yum groupinfo provides info about a particular group, including what

packages compose the group.


yum groupinstall installs a group of packages.
yum grouperase removes a group.
yum groupupdate updates a group.

5. Handling third Party Software


The rpm utility is a low-level tool that can get information abouth the contents
of package files and installed packages. It gets its its information from a local
database or the package files themselves.

The genral form of a query is:


rpm q [ select-option ] [ query-option ]
rpm --query [ select-option ] [ query-option ]
RPM Queries: Select Options
-q a ----- all installed packages.
-q package-name

------ currently installed packages.

-q p package-file.rpm ------ package file named package-file.rpm


-q f file-name ------ what package provides filename.
RPM Queries: Information About Content of Packages:
-q

--- lists the packages name and version

-q i

--- package information; compare to yum list

-q l

--- list of files installed by the specified package

-q c

--- list just configuration files

-q d

--- list just documentation files

-q --scripts

--- list shell scripts that may run after the package is

installed or uninstalled
-q --changelog

--- list change information for the package

6. Using YUM to install Local Package Files

Yum localinstall packagefile.rpm can be used to install package files directly. It


automatically installed any dependencies the package has from any configured
yum repositories.
The --nogpgcheck option can be disabled the signature check if you are certain
the package is legitimate.

Вам также может понравиться