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

RH133

Red Hat Enterprise Linux


System Administration
2
Unit-2: Package anagement

!nsta"" and Remo#e RP packages

$uery Packages and #eri%y t&eir status

anage Packages using 'U

Re"ations&ip (et)een 'U * RP

+reating pri#ate 'U repository


3
Package anagement
4
,&at is Package-
The RPM Package Manager (RPM) is an open packaging system, which
runs on Red Hat Enterprise Linux as well as other Linux and !"#
systems$
RPM has %i&e 'asic modes o% operation( installing, uninstalling, upgrading,
)uerying, and &eri%ying$
*o%tware to 'e installed using rpm is distri'uted through rpm package %iles,
which are essentially compressed archi&es o% %iles and associated
dependency in%ormation$ Package %iles are named using the %ollowing
%ormat(
name-#ersion-re"ease.arc&itecture.rpm
5
RP commands:
RPM packages typically ha&e %ile names like %oo+,$-+,$i./0$rpm$ The %ile name
includes the package name (%oo), #ersion (,$-), re"ease (,), and
arc&itecture (i./0)$ To install a package, log in as root and type the
%ollowing command at a shell prompt(
rpm -i#& %oo-1./-1.i301.rpm
1ther options are(
Upgrade: rpm +&h packagename$rpm
(2ill upgrade the old &ersion with the new &ersion package or else install new
package)
2res&en: rpm +3&h packagename$rpm
(2ill only upgrade the old &ersion with the new &ersion can4t work i% the old
&ersion is not there$
Erase: rpm +e packagename
(2ill remo&e 5 erase the package)
6
RP $ueries

rpm -3 : 4o 3ueries any insta""ed package

rpm -3a : 4o 3ueries a"" insta""ed packages

rpm -3i : 4o s&o) genera" in%ormation

rpm -3" : 4o s&o) "ist o% package %i"es insta""ed

rpm -3ip : 4o s&o) genera" in%ormation o% uninsta""ed package

rpm -3"p : 4o s&o) "ist o% packages o% uninsta""ed package


7
A5R 6 Automatic 5ependency Reso"ution 7

sed to automatic installation o% dependent packages

"n&oked with aid option$

se in con6unction with rpmd'$redhat

rpm +i&h + +aid packagename$rpm

source%orge$net ++ world4s 'iggest linux so%tware


respository
8
'U 6'e""o) dog Updater odi%ied7
9
,&at is 'U
7um is an automatic updater and package insta""er8remo#er %or rpm systems$
"t automatically computes dependencies and %igures out what things should
occur to install packages$ "t makes it easier to maintain groups o% machines
without ha&ing to manually update each one using rpm$
8 single command can update all so%tware installed, including third+party
so%tware, security updates and operating system$
10
'U Ser#er con%iguration:
S4EP 91. !:S4ALL ;24P< 6%or 'U t&ru 24P7 9o to the *er&er %older in :;:
and install 3TP package(
rpm -i#& #s%tpd....rpm
8lso install <createrepo= package %or creating repositories$
rpm -i#& createrepo.... rpm
S4EP 92. 3rom :;: copy e&erything to H:: under 5&ar5%tp5pu' (make sure you
ha&e atleast .9> o% %ree space %or 5&ar)
cp -r#% 8"ocation-o%-5=58> 8#ar8%tp8pu(8
S4EP 93. 2or +reating ?R@UP RepositoriesA go to 8#ar8%tp8pu(
cp Ser#er8repodata8comps-r&e"B-ser#er-core.xm" Ser#er8
cp =48repodata8comps-r&e"B-#t.xm" =48
cp +"uster8repodata8comps-r&e"B-c"uster.xm" +"uster8
cp +"usterStorage8repodata8comps-r&e"B-c"uster-st.xm" +"usterStorage8
11
'U Ser#er con%iguration:
S4EP 9C. ?reate 9roup Repositories using <createrepo= command
createrepo -#g comps-r&e"B-ser#er-core.xm" 8#ar8%tp8pu(8Ser#er
createrepo -#g comps-r&e"B-#t.xm" 8#ar8%tp8pu(8=4
createrepo -#g comps-r&e"B-c"uster.xm" 8#ar8%tp8pu(8+"uster
createrepo -#g comps-r&e"B-c"uster-st.xm" 8#ar8%tp8pu(8+"usterStorage
S4EP 9B. Restart the ;*3TP: ser&ice and put it under <chkcon%ig=$
ser#ice #s%tpd restartD c&kcon%ig #s%tpd on
12
'U +"ients con%iguration steps
#i 8etc8yum.repos.d8ser.repo
ESer#erF
nameGy Loca" Ser#er Repo
(aseur"G%i"e:888#ar8%tp8pu(8Ser#er
9(aseur"G%tp:88x.x.x.x8pu(8Ser#er
gpgc&eckG/
13
'U +ommands
yum insta"" packagename
yum remo#e packagename
yum "ist
yum c"ean a""
yum ;groupinsta""< groupname
?
Questions

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