How to configure yum server? | How to setup Yum server? | Yum server configuration method

Yum it is mean yellow updated modifier
Yum server it used to perform the following service
Maintain the DHCP server (providing the ipaddress to the client system)
Maintain the DNS server (maintain the domain name and there ipaddress)
Maintain the web server
If we install Yum server properly then only these service we can use otherwise we can’t to configure these service

ALGORITHM
First login to the root.
STEP1: create the directory and sub directory /var/ftp/pub using mkdir with –var option
Step2: mount the cdrom or dvd rom to copy the redhat package(insert the redhatos setup dvd)
Step3: copy mnt directory data to the /var/ftp/pub
Step4: After coping the file Move to /var/ftp/pub/Server
Ste5: go to the /repodata( /var/ftp/pub/Server/repodata)
Copy the file comps-rhel5-server-core.xml into /root
These file used to create the group for rpm package(These file is used in the step8)
Step6: create the rpm package through:
Rpm command
Step7: list out rpm file
Step8: create group for rpm file with using comps-rhel-core.xml(already copied file:step5)
Step9:go to the directory
/etc/yum.respos.d
Step10: copy the file rhel(tab key) into server.repo
Why we are copy file means we maintain backup for editing
Step11: edit the server.repo file
Step12: finally clean up and List out the yum server

Configuration
STEP1: create the directory and sub directory /var/ftp/pub using mkdir with –var option
[root@localhost ~]# mkdir -p /var/ftp/pub
Step2: mount the cdrom or dvd rom to copy the red hat package(insert the red hat os setup DVD)
[root@localhost ~]# mount /dev/cdrom /mnt
If you use dvd type the following command
[root@localhost ~]# mount /dev/dvd /mnt
If mount successfully it will display like that
mount: block device /dev/cdrom is write-protected, mounting read-only
Step3: copy mnt directory data to the /var/ftp/pub

[root@localhost ~]# cp -var /mnt/* /var/ftp/pub
It will take 5 minutes to copy the file
Step4: After copying the file Move to /var/ftp/pub/Server
[root@localhost ~]# cd /var/ftp/pub/Server/

Ste5: go to the /repodata( /var/ftp/pub/Server/repodata)
Copy the file comps-rhel5-server-core.xml into /root
These file used to create the group for rpm package(These file is used in the step8)

[root@localhost Server]# cd repodata
[root@localhost repodata]# ls
comps-rhel5-server-core.xml other.xml.gz repomd.xml
filelists.xml.gz primary.xml.gz TRANS.TBL
[root@localhost repodata]# cp comps-rhel5-server-core.xml /root
After copying the file delete the repodata
[root@localhost repodata]# cd ..
[root@localhost Server]# rm -rf repodata/
Step6: create the rpm package through:
Rpm command
[root@localhost Server]# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm
createrepo-0.4.4-2.fc6.noarch.rpm these file present in the server directory
Step7: list out rpm file
[root@localhost Server]# createrepo –v /var/ftp/pub/Server

Step8: create group for rpm file with using comps-rhel-core.xml(already copied file:step5)
[root@localhost Server]# createrepo -g /root/comps-rhel5-server-core.xml /var/ftp/pub/Server/
Step9:go to the HOME directory
/etc/yum.respos.d
[root@localhost yum.repos.d]# cd ~
Then go to the directory /etc/yum.repos.d/
[root@localhost yum.repos.d]# cd /etc/yum.repos.d/
Step10: copy the file rhel(tab key) into server.repo
Why we are copy file means we maintain backup for editing
These directory contain rhel-debuginfo.repo copy these file into server.repo
[root@localhost yum.repos.d]# cp rhel-debuginfo.repo server.repo
edit server.repo file


Step11: edit the server.repo file
Change line1:debug into server
Line2: delete the line
Line3:chage file
Baseurl=file:///var/ftp/pub/Server/
Line4:change 0 to 1
Line5: change 1 to 0
Line6: delete the line

[root@localhost yum.repos.d]# vim server.repo

How to configure yum server? | How to setup Yum server? | Yum server configuration methodBefore the change
[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
~
After the change
[rhel-serverinfo]
baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=0

Step12: finally clean up and List out the yum server
By through
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum list all

Yum server configure successfully

Post a Comment

0 Comments