Tuesday, February 16, 2010

YUM configuration and XEN virtulization in RedHat 5.

Hi friends,

Please see the step by step yum configuration and XEN virtulization configuration. I wish this will help you more.
Your comments are welcome.



1.Yum configuration in Red Hat 5.x and XEN Virtualization

Here is a step by step Yum configuration.

Either you can make a separate partition or make a separate folder in / directory
Here in my case I am making /data/redhat directory
I am coping all 5 CDs of Red Hat 5.2 OS to /data/redhat folder using following command.
1.mount CD 1 and give this command
# cd /media/RHEL-5.3\ i386\ Disc\ 1/
2.# cp -av * /data/redhat/
3.Repeat step 1 and step 2 for rest of all CDs (CD2, CD3, CD4, CD5).
4.# createrepo -v /data/redhat for to create a local Yum Repository.
5.Configure ftp server with following steps.
6.Open /etc/vsftpd/vsftpd.conf file and make necessary changes.
anonymous_enable=YES
local_enable=YES
anon_root=/data/redhat/Server
7.Open /etc/yum.repos.d/base.repo
[Server--RHEL5]

name = RHEL 5.3

baseurl=file:///data/redhat/
#ftp service not require.
Or
baseurl=ftp://SERVER-IP/ # ftp service require to install client side.
enabled=1

gpgcheck=0

8.service vsftpd restart
9.service yum-updatesd restart
10.If you are trying to install and configure yum on same server ftp server will not require even if you configure ftp service on same server this will work, it is optional .
11.Now you can install rpms and dependency using yum.
12.yum clean all
13.yum update
14.yum install
15.Here I am doing xen virtulization .
16.yum install xen virt-manager kernel-xen
17.restart your server
18.make sure your system in booting form kernel /xen.gz-2.6.18-128.el5
19.To check your system boot in new kernel use command uname -a
20.use command to '#virt-manager & ' for Create new domains.
21.On command prompt type following command.
22.# virt-install --paravirt --name OSNAME --ram 512 --file /data/vm/OS.img --file-size 9 --network network:default --vnc --cdrom /dev/cdrom-sr0
23.In my system I used following example..
]# virt-install

What is the name of your virtual machine? RedHat5.3

How much RAM should be allocated (in megabytes)? 512

What would you like to use as the disk (file path)? /data/vm/rhel.img

How large would you like the disk (/data/vm/rhel.img) to be (in gigabytes)? 9

Would you like to enable graphics support? (yes or no) yes

What is the install location? /dev/cdrom-sr0

24.You view all system using xm list command.


Good Luck

Anand.