Você está na página 1de 7

YUM Configuration IN RHEL 5/6

Yum : (Yellolwdog Updater Modified)


It is Software Update Server.
Yum will create index of all rpm packages
By using yum ,you can easily manage software (means ,you can easily
install,remove rpm packages with out using rpm command).
All new updates downloaded from RHN Support Server to Local yum server
,when ever any client computer require new updates directly they can install from
local yum server (It is not needed to connect to RHN Server through internet)
Steps for configuring YUM Server :

Step1: Configure IP Address as 192.168.5.X


Step2: Install vsftpd package for FTPServer
Step3: Create a folder Server in /var/ftp/pub
Step4: Copy all files into /var/ftp/pub/Server from Linux DVD
Step5:Install createrepo rpm package from Linux DVD
Step6:Cretae report / index
Step7:Start vsftpd service
Step8:Configure yum file (Both in server and Clients)

Step1 : Configure IP Address for YUM Server as 192.168.5.X


[root@mylinuxpc1 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:3A:3E:B6
inet addr:192.168.5.x Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3a:3eb6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7455 errors:0 dropped:0 overruns:0 frame:0
TX packets:8359 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:686857 (670.7 KiB) TX bytes:793417 (774.8 KiB)
Interrupt:67 Base address:0x2000
[root@mylinuxpc1 ~]#
Step2: Install vsftpd package for FTPServer
Insert Linux DVD
[root@mylinuxpc1 ~]# cd /media/CDROM/Server/
[root@mylinuxpc1 Server]#
[root@mylinuxpc1 Server]# pwd
/media/CDROM/Server
[root@mylinuxpc1 Server]#
[root@mylinuxpc1 Server]# rpm -Uvh vsftpd-2.0.5-10.el5.i386.rpm
Preparing...
########################################### [100%]
1:vsftpd
########################################### [100%]
[root@mylinuxpc1 Server]#

Step3: Create a folder Server in /var/ftp/pub


Step4: Copy all files into /var/ftp/pub/Server from Linux DVD
[root@mylinuxpc1 ~]# cd /var/ftp/pub/
[root@mylinuxpc1 pub]#
[root@mylinuxpc1 pub]# mkdir Server
[root@mylinuxpc1 pub]#
[root@mylinuxpc1 Server]# cp * /var/ftp/pub/Server/
cp: omitting directory `repodata'
[root@mylinuxpc1 Server]#
Step5:Install createrepo rpm package from Linux DVD
Insert Linux DVD
[root@mylinuxpc1 ~]# cd /media/CDROM/Server/
[root@mylinuxpc1 Server]#
[root@mylinuxpc1 Server]# pwd
/media/CDROM/Server
[root@mylinuxpc1 Server]#
[root@mylinuxpc1 Server]# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm --force
warning: createrepo-0.4.4-2.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID
37017186
Preparing...
########################################### [100%]
1:createrepo
########################################### [100%]
[root@mylinuxpc1 Server]#
Step6:Cretae report / index
[root@mylinuxpc1 Server]# createrepo -g media/CDROM/Server/repodata/compsrhel5-server-core.xml /var/ftp/pub/Server
2113/2113 - squirrelmail-1.4.8-4.el5.noarch.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@mylinuxpc1 Server]#
Step7:Start vsftpd service
[root@mylinuxpc1 Server]# service vsftpd start
Starting vsftpd for vsftpd:
[ OK ]
[root@mylinuxpc1 Server]#
Step8 : Configure rhel-debuginfo.repo file
Existed file
[root@localhost~]# vi /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug

baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/
$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Modified File :
[core]
name=Linux $releasever - $basearch - Debug
baseurl=ftp://192.168.5.x/pub/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Listing what are samba packages installed
(Syntex : yum list installed | grep <package name> )
[root@mylinuxpc1 ~]# yum list installed |grep samba*
This system is not registered with RHN.
RHN support will be disabled.
samba.i386
3.0.23c-2
installed
samba-common.i386
3.0.23c-2
installed
system-config-samba.noarch 1.2.39-1.el5
installed
[root@mylinuxpc1 ~]#
Installing package : (Syntex : yum install <package name>):
[root@mylinuxpc1 ~]# yum install samba*
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package samba-client.i386 0:3.0.23c-2 set to be updated
---> Package samba-swat.i386 0:3.0.23c-2 set to be updated
---> Package samba.i386 0:3.0.23c-2 set to be updated
---> Package samba-common.i386 0:3.0.23c-2 set to be updated
--> Running transaction check
Dependencies Resolved
==================================================================
===========
Package
Arch
Version
Repository
Size

==================================================================
===========
Installing:
samba
i386
3.0.23c-2
core
16 M
samba-client
i386
3.0.23c-2
core
4.3 M
samba-common i386
3.0.23c-2
core
8.6 M
samba-swat
i386
3.0.23c-2
core
7.3 M
Transaction Summary
==================================================================
===========
Install
4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 36 M
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
Importing GPG key 0x37017186 "Red Hat, Inc. (release key) <security@redhat.com>"
Is this ok [y/N]: y
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: samba-common
######################### [1/4]
Installing: samba
######################### [2/4]
Installing: samba-client
######################### [3/4]
Installing: samba-swat
######################### [4/4]
Installed: samba.i386 0:3.0.23c-2 samba-client.i386 0:3.0.23c-2 samba-common.i386
0:3.0.23c-2 samba-swat.i386 0:3.0.23c-2
Complete!
[root@mylinuxpc1 ~]#
Removing Packages :
Syntax : (yum remove <package name> )
[root@mylinuxpc1 ~]# yum remove samba*
.
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package samba-client.i386 0:3.0.23c-2 set to be erased
---> Package samba-swat.i386 0:3.0.23c-2 set to be erased
---> Package samba.i386 0:3.0.23c-2 set to be erased
---> Package samba-common.i386 0:3.0.23c-2 set to be erased
--> Running transaction check
Dependencies Resolved

==================================================================
===========
Package
Arch
Version
Repository
Size
==================================================================
===========
Removing:
samba
i386
3.0.23c-2
installed
29 M
samba-client
i386
3.0.23c-2
installed
11 M
samba-common i386
3.0.23c-2
installed
22 M
samba-swat
i386
3.0.23c-2
installed
14 M
Transaction Summary
==================================================================
===========
Install
0 Package(s)
Update 0 Package(s)
Remove 4 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Removing : samba-client

######################### [1/4]

Removing : samba-swat
Removing : samba
Removing : samba-common

######################### [2/4]
######################### [3/4]
######################### [4/4]

Removed: samba.i386 0:3.0.23c-2 samba-client.i386 0:3.0.23c-2 samba-common.i386


0:3.0.23c-2 samba-swat.i386 0:3.0.23c-2
Complete!
[root@mylinuxpc1 ~]#
Listing packages according to GroupWise :
[root@mylinuxpc1 ~]# yum grouplist
Setting up Group Process
Setting up repositories
Installed Groups:
Office/Productivity
Editors
System Tools
GNOME Software Development
Text-based Internet
X Software Development
Legacy Network Server
Authoring and Publishing
FTP Server

Network Servers
Games and Entertainment
X Window System
Graphics
Printing Support
Server Configuration Tools
Sound and Video
Administration Tools
Graphical Internet
Available Groups:
Engineering and Scientific
MySQL Database
Development Libraries
DNS Name Server
GNOME Desktop Environment
Legacy Software Development
Java Development
Windows File Server
Web Server
KDE Software Development
KDE (K Desktop Environment)
Mail Server
PostgreSQL Database
News Server
Development Tools
Done
[root@mylinuxpc1 ~]#
[root@mylinuxpc1 ~]# yum groupinstall "Server Configuration Tools"
Dependencies Resolved
==================================================================
===========
Package
Arch
Version
Repository
Size
==================================================================
===========
Installing:
system-config-httpd noarch 5:1.3.3.1-1.el5 core
598 k
system-config-nfs
noarch 1.3.23-1.el5 core
185 k
system-config-samba noarch 1.2.39-1.el5 core
263 k
Installing for dependencies:
alchemist
i386
1.0.36-2.el5 core
107 k
httpd
i386
2.2.3-6.el5
core
1.1 M
libxslt-python
i386
1.1.17-2
core
135 k
samba
i386
3.0.23c-2
core
16 M
samba-common
i386
3.0.23c-2
core
8.6 M
Transaction Summary
==================================================================
===========
Install
8 Package(s)

Update 0 Package(s)
Remove 0 Package(s)
Total download size: 27 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): system-config-samb 100% |=========================| 263 kB 00:00
(2/8): samba-common-3.0.2 100% |=========================| 8.6 MB 00:00
(3/8): system-config-nfs- 100% |=========================| 185 kB 00:00
(4/8): alchemist-1.0.36-2 100% |=========================| 107 kB 00:00
(5/8): system-config-http 100% |=========================| 598 kB 00:00
(6/8): httpd-2.2.3-6.el5. 100% |=========================|
1.1 MB 00:00
(7/8): samba-3.0.23c-2.i3 100% |=========================| 16 MB 00:00
(8/8): libxslt-python-1.1 100% |=========================|
135 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: samba-common
######################### [1/8]
Installing: samba
######################### [2/8]
Installing: libxslt-python
######################### [3/8]
Installing: httpd
######################### [4/8]
Installing: alchemist
######################### [5/8]
Installing: system-config-samba
######################### [6/8]
Installing: system-config-nfs
######################### [7/8]
Installing: system-config-httpd
######################### [8/8]
Installed: system-config-httpd.noarch 5:1.3.3.1-1.el5 system-config-nfs.noarch 0:1.3.231.el5 system-config-samba.noarch 0:1.2.39-1.el5
Dependency Installed: alchemist.i386 0:1.0.36-2.el5 httpd.i386 0:2.2.3-6.el5 libxsltpython.i386 0:1.1.17-2 samba.i386 0:3.0.23c-2 samba-common.i386 0:3.0.23c-2
Complete!
[root@mylinuxpc1 ~]#

Você também pode gostar