1:Assign ip to the server machine

[root@station1 ~]#neat-tui

 2:Create  a directory in /var/ftp/

[root@station1 ~]# mkdir –p /var/ftp/pub

 3:Mount the dvd

[root@station1 ~]# mount /dev/cdrom  /mnt

 4:Now copy the dvd in /var/ftp/pub

[root@station1 ~]# cp –rvf /mnt/*   /var/ftp/pub

 5:Now install the recquired rpm

[root@station1 ~]# rpm –ivh /mnt/Server/vsftpd

[root@station1 ~]# rpm –ivh /mnt/Server/createrepo

 6:copy the metadata files(.XML)

[root@station1 ~]# cp /var/ftp/pub/Server/repodata/comps-rhel……..     /var/ftp/pub/Server

[root@station1 ~]# cp /var/ftp/pub/VT/repodata/comps-rhel……..         /var/ftp/pub/VT

[root@station1 ~]# cp /var/ftp/pub/Cluster/repodata/comps-rhel…….. /var/ftp/pub/Cluster

[root@station1 ~]#cp /var/ftp/pub/ClusterStorage/repodata/comps-rhel……     /var/ftp/pub/ClusterStorage

 

7:Now create the repository for server,VT,Cluster n ClusterStorage

[root@station1 ~]#createrepo  -vg /var/ftp/pub/Server/comps-rhel………../var/ftp/pub/Server

[root@station1 ~]#createrepo  -vg /var/ftp/pub/VT/comps-rhel……………./var/ftp/pub/VT

[root@station1 ~]#createrepo  -vg /var/ftp/pub/Cluster/comps-rhel………/var/ftp/pub/Cluster

[root@station1 ~]#createrepo  -vg /var/ftp/pub/ClusterStorqage/comps-rhel……….. /var/ftp/pub/ClusterStorage

 8:create config file on server n client machine

[root@station1 ~]# vim /etc/yum.repos.d/anyname.repo

[Server]

Name=Server

Baseurl=ftp://serverip/pub/Server

gpgcheck=0

*note:the ip add in base url should be your servers ip address

[VT]

Name=VT

Baseurl=ftp://serverip/pub/VT

gpgcheck=0

 9:restart the services on server

[root@station1 ~]# service network restart

[root@station1 ~]# service vsftpd restart

 10:disable the Selinux on the server

[root@station1 ~]# lokkit

 

 

Posted in: Linux.
Last Modified: January 12, 2017

Leave a reply