Yum repo through NFS method :
If we have Repository server (Where all the patches or RPMs (redhat package manager) are stored under some directories(filesystem) then we can mount them from repo server to destination server through NFS.
In this example:
repohost = servername where all repositories are stored
/repo/rhel6/rhel7-base = RHEL base packages stored here
/repo/rhel6/latest-update = RHEL latest update packages stored here
Note : We can mount entire mount point as well, instead of mounting only above two directories of the mountpoint
/repo/yum & /repo/yum-update = repo mountpoint on client server
On repository server:
On client server:
1. Create mountpoint /repo/yum where we will store base packages
2. mount exported NFS remote filesystem /repo/rhel6/rhel7-base
3. Create mount point /repo/yum-update
4. mount exported NFS remote filesystem /repo/rhel7/latest-update
5. Edit /etc/auto.master file:
6. Edit /etc/auto.yum file:
yum-update -fstype=nfs repohost:/repo/rhel7/latest-update
7. Edit /etc/yum.conf file:
name=yum
baseurl=file:///repo/yum
enabled=1
gpgcheck=0
[yum-update]
name=yum-update
baseurl=file:///repo/yum-update
enabled=1
gpgcheck=0
If we have Repository server (Where all the patches or RPMs (redhat package manager) are stored under some directories(filesystem) then we can mount them from repo server to destination server through NFS.
In this example:
repohost = servername where all repositories are stored
/repo/rhel6/rhel7-base = RHEL base packages stored here
/repo/rhel6/latest-update = RHEL latest update packages stored here
Note : We can mount entire mount point as well, instead of mounting only above two directories of the mountpoint
/repo/yum & /repo/yum-update = repo mountpoint on client server
On repository server:
On client server:
1. Create mountpoint /repo/yum where we will store base packages
[root@cloud home]# mkdir -p /repo/yum
2. mount exported NFS remote filesystem /repo/rhel6/rhel7-base
[root@cloud home]# mount repohost:/repo/rhel6/rhel7-base /repo/yum
3. Create mount point /repo/yum-update
[root@cloud home]# mkdir -p /repo/yum-update
4. mount exported NFS remote filesystem /repo/rhel7/latest-update
[root@cloud home]# mount repohost:/repo/rhel7/latest-update /repo/yum-update
5. Edit /etc/auto.master file:
[root@cloud home]# vi /etc/auto.master
/repo /etc/auto.yum6. Edit /etc/auto.yum file:
[root@cloud home]# vi /etc/auto.yum
yum -fstype=nfs repohost:/repo/rhel6/rhel7-baseyum-update -fstype=nfs repohost:/repo/rhel7/latest-update
7. Edit /etc/yum.conf file:
[root@cloud home]# vi /etc/yum.conf
[yum]name=yum
baseurl=file:///repo/yum
enabled=1
gpgcheck=0
[yum-update]
name=yum-update
baseurl=file:///repo/yum-update
enabled=1
gpgcheck=0
No comments:
Post a Comment