YUM through NFS:

Suppose the dump of packages is present in my NFS server. Now I am going to configure the YUM to the stand alone server.

• Share the packages to the client by editing the file ‘/etc/exports’ file.

[root@sys1 /]# vi /etc/exports
/opt *(rw,sync)
/repo *(rw,sync,no_root_squash)

 

• Now restart the NFS service.

[root@sys1 /]# service nfs restart
Shutting down NFS daemon:                                   [ OK ]
Shutting down NFS                                           [ OK ]
Shutting down NFS quotas:                                   [ OK ]
Shutting down NFS services:                                 [ OK ]
Starting NFS services:                                      [ OK ]
Starting NFS quotas:                                        [ OK ]
Starting NFS mountd:                                        [ OK ]
Stopping RPC idmapd:                                        [ OK ]
Starting RPC idmapd:                                        [ OK ]
Starting NFS daemon:                                        [ OK ]

 

• Go to the client and mount the shared repository.

[root@sys2 /]# mkdir /packages
[root@sys2 /]# mount -t nfs 192.168.1.101:/repo /packages/

 

• Now go to YUM configuration file ‘/etc/yum.repos.d/ithonors.repo’ and change the path as ‘/packages’.

[root@sys2 /]# vim /etc/yum.repos.d/ithonors.repo
[ithonors-repo]
name=pkgstore
baseurl=file:///packages
enable=1
gpgcheck=0

 

• Create the repository as follows.

[root@sys2 /]# createrepo -v /packages

 

• Clean the previous configurations.

[root@sys2 /]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: InstallMedia ithonors-repo
Cleaning up Everything

 

• Update the packages as follows.

[root@sys2 /]# yum update
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
ithonors-repo                                          | 2.9 kB 00:00 ...
ithonors-repo/primary_db                               | 3.1 MB 00:00 ...
Setting up Update Process
No Packages marked for Update

 

• Check the configuration as follows.

[root@sys2 /]# yum install httpd
Previous:: Configuring YUM for standalone Next::