Saturday, 1 February 2014

How to share the yum repository threw NFS on Red Hat Linux

Hello Friends I am Deepak Saini and today we are discus on Yum Repository.

1st of all Why we are use yum repository.
We are using the yum repository for installed and security updates fix on multiple systems in our local network this is a efficient way.Because all packages are download  the fast speed on your local LAN connection  and local server.

The ways how we share the yum repository.
1 NFS server
2 Ftp Server  
3 Http share

 So Lets start :) 

1 How to share the yum repository threw NFS server .

Setups :-

1 1st of all we need all packages in a  directory on our server or system which threw we are sharing yum repository.
 So we are install the Rhel6 cd in our server and then copy the package directory from cd.
Syntax:- cd /media/<Rhel6 cd name>
Syntax:- ls

First of all we are going into the cd  and then list the content for finding Package directory .
Now we are copy the directory on you system anywhere.
Syntax:- cp Package /root/Desktop/
 In my case i am copy the package directory on the desktop.

2 Now we are going to install the createrepo packages to create repo data.With the all dependencies.
   Syntax:-rpm -ivh createrepo-0.9.8.-4.el6.noarch.rpm.

Dependencies
1.    deltarpm-3.5-0.5.20090913gt.el6.86_64.rpm

2     python-deltarpm-3.5-0.5.20090913git.el6.86_64.rpm

First we are install these dependencies.

3 Now we are going to create repo data.
 Syntax :- createrepo -v /root/Desktop/Package/
in this createrepo is command and - v for verbose and /root/Desktop/Package is our path where packages are store.

4 Now times come when we are sharing the repo data threw NFS server.
  So Now we are entry in a file /etc/exports 
We are enter the line /root/Desktop/Packages/               192.168.0.0/255.255.255.0 (rw,syn) like this

is my case and our data is share But some conditions are apply 1st of all nfs is working on your server then your able to share threw nfs.

5 Now we are going to restart our nfs server.
   Syntax:- service nfs restart


6 Now we are on the service in all runlevels.
  Syntax:-chkconfig nfs on

7 Now we are stop the iptables service .
Syntax:-service iptables stop

8 Now we are going for stop iptables in all runlevels.
 Syntax:-chkconfig iptables off

Now Server work is over .

On client side 
 On client side We are using some command .

1 showmount -e 192.168.0.15
In this we are search the mounting directory on server which one we share on network.
From server.

2  mount 192.168.0.15:/root/Desktop/Package /root/Desktop/

In this we are mount the shared directory on our local system and 1st path is server and second is our local system.

3 Now we are creating or local.repo file like this  /etc/yum.repos.d/local.repo.
We just change the base url in this case.
Syntax:- cat /etc/yum.repos.d/local.repo
               [client]
               baseurl = file:///root/Desktop/Package/        (Path where our repo data placed)
               enabled = 1
               gpgcheck = 0
             (ctrl D for save the file )


Thanks for reading and Sorry for my R.I.P English Jai Hind Dedicate to DeadManIndia and Govind Singh _/\_ seniors help me to improve my knowledge

            
As I noted in my previous tutorial about local repository, if you have to installed software, security updates and fixes often in multiple systems in your local network, then having a local repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces your annual cost of Internet. - See more at: http://www.unixmen.com/setup-local-yum-repository-on-centos-rhel-scientific-linux-6-4/#sthash.5k9AgJUM.dpuf
As I noted in my previous tutorial about local repository, if you have to installed software, security updates and fixes often in multiple systems in your local network, then having a local repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces your annual cost of Internet. - See more at: http://www.unixmen.com/setup-local-yum-repository-on-centos-rhel-scientific-linux-6-4/#sthash.5k9AgJUM.dpuf
As I noted in my previous tutorial about local repository, if you have to installed software, security updates and fixes often in multiple systems in your local network, then having a local repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces your annual cost of Internet. - See more at: http://www.unixmen.com/setup-local-yum-repository-on-centos-rhel-scientific-linux-6-4/#sthash.5k9AgJUM.dpuf
As I noted in my previous tutorial about local repository, if you have to installed software, security updates and fixes often in multiple systems in your local network, then having a local repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces your annual cost of Internet. - See more at: http://www.unixmen.com/setup-local-yum-repository-on-centos-rhel-scientific-linux-6-4/#sthash.5k9AgJUM.dpuf
As I noted in my previous tutorial about local repository, if you have to installed software, security updates and fixes often in multiple systems in your local network, then having a local repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces your annual cost of Internet. - See more at: http://www.unixmen.com/setup-local-yum-repository-on-centos-rhel-scientific-linux-6-4/#sthash.5k9AgJUM.dpuf
As I noted in my previous tutorial about local repository, if you have to installed software, security updates and fixes often in multiple systems in your local network, then having a local repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces your annual cost of Internet. - See more at: http://www.unixmen.com/setup-local-yum-repository-on-centos-rhel-scientific-linux-6-4/#sthash.5k9AgJUM.dpuf

0 comments:

Post a Comment