When we have large number of Linux systems & each system is updating directly from internet, data consumed will be enormous. In order to save the data, we can create an offline yum & share it over our Local network. Other Linux machines on network will then fetch system updates directly from this Local yum, thus saving data & also transfer speed also be very good since we will be on our local network.

We can share our yum repository using any of the following or both methods:

Using Web Server (Apache)

Using ftp (VSFTPD)

We will be discussing both of these methods but before we start, you should create a YUM repository using my earlier tutorial (READ HERE)

Using Web Server

Firstly we need to install web-server (Apache) on our yum server which has IP address 192.168.1.100. Since we have already configured a yum repository for this system, we will install apache web server using yum command,

$ yum install httpd

Next, we need to copy all the rpm packages to default apache root directory i.e. /var/www/html or since we have already copied our packages to /YUM, we can create a symbolic link from /var/www/html to /YUM

$ ln –s /var/www/html/Centos /yum

Restart you web-server to implement changes

$ systemctl restart httpd

Configuring client machine

Configurations for sharing Yum repository on server side are complete & now we will configure our client machine, with an IP address 192.168.1.101, to receive updates from our created offline yum.

Create a file named offline-yum.repoin /etc/yum.repos.dfolder & enter the following details,

Your client machine is now ready to receive updates over ftp. For configuring vsftpd server to share files with other Linux system , read tutorial here.

Both methods for sharing an offline yum over LAN are good & you can choose either of them, both of these methods should work fine. If you are having any queries/comments, please share them in the comment box down below.

If you think we have helped you or just want to support us, please consider these :-