Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » Creating an offline local repository in Linux
  • Featured image 1
    How and where to find your BitLocker recovery key on Windows Security | Vulnerability Scans and Assessment
  • image 29
    How to force your website to redirect from HTTP to HTTPS using a web.config file Network | Monitoring
  • Wingettool
    Install and Manage Applications with Winget Windows
  • ztre23fsas
    Grant or Deny Microphone Access on Mac Mac
  • Cyclic Redundancy
    Cyclic Redundancy: Resolve Data Error on Inaccessible Hard Drive Windows
  • 111615smarthomeNG
    Unspecified GSS failure: How to fix Clock skew too great Web Server
  • screenshot 2020 04 22 at 23.28.23
    Remove saved RDP connections in Windows Windows
  • maxresdefault
    Error 0x8007232B: Can’t activate Windows on this device as we can’t connect to your organization’s activation server Windows

Creating an offline local repository in Linux

Posted on 25/09/202018/04/2024 Dickson Victor By Dickson Victor No Comments on Creating an offline local repository in Linux
offline local repository

Repositories can be defined as a box where your work tools are kept. It is a store for packages/applications/software that enhance your Linux experience. There are repositories you can access online, however, within your Linux OS DVD is a rich repository that you do not require internet access to use. This tutorial will work you through creating and accessing this offline local repository in Linux. Please see Add Registry Keys via DISM in Windows, and how to Find and remove Malware with Microsoft Defender Offline.

First off, you need to ensure the connection of iso file for your OS (only if you are working from a Virtual Machine, if not, skip this first step). On the Virtual Machine, right click on the Linux name you are using and then click on settings

Creating an offline local repository in Linux

Linux

When the settings dialogue box opens, highlight the CD/DVD(IDE) tab, then tick the Connected and Connect at Power on checkbox.

create local repository

Browse to the location of the ISO file on your desktop. Click on the file to open it to the dialogue box, then click on OK at the bottom right of the dialogue box. In a short while, the icon for the OS should appear on the desktop. (Creating an offline local repository in Linux)

Linux repository management

MOUNT THE ISO FILE

Now switch to the root account. Create a directory for the mount point using the mkdir command. I have chosen to create and call my mount point iso

offline local repository

Now mount the iso file to the newly created directory using the mount command

Mount –o loop /path-of-iso-fle /destination-path

(in case you are not certain, a df –h command will tell you the address of your iso file)

Creating an offline local repository in Linux-Linux

Furthermore, Create a directory for the old cached repository file

Use the mkdir command a new directory, I am going to call mine “oldrepo”. Thus, this directory will be a store for the old repository files; you do not need to delete them. (Perhaps, there will be a need for something in there someday, you never can tell).

These store repository files in the /etc/yum.repos.d directory. Now move these files to the newly created repository using;

mv /etc/yum.repos.d/* /newly-created-directory
Creating an offline local repository in Linux-Linux repository management

Create Repository Config File

Create a repository configuration file in /etc/yum.repos.d

Use any text editor to create a new file that ends with a “.repo” extension in the /etc/yum.repos.d directory. (The repository file name must end with a “.repo” extension). Mine is called new.repo and the command will be;

vi /etc/yum.repos.d/RepositoryName.repo
Creating an offline local repository in Linux

In that file, include the following parameters

In creating an offline local repository in Linux, you need to clean the yum cache using the yum clean all command. You can also see the newly created repository by using the yum repolist all command

Now you can use the yum command to Discord Installation Guide for Linux System your packages. The next two images are cuts from installing the httpd from the newly created repository

So, without access to the internet, you can have your offline repository and update packages whenever access to the internet is available. With the steps mentioned above, creating an offline local repository in Linux is made easy.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux

Post navigation

Previous Post: How to enable or disable DotNet Framework (NetFx3) via PowerShell, Control Panel, and DISM in Windows
Next Post: Installation and configuration of Cockpit on CentOS Linux

Related Posts

  • PersonalHow to Create Symbolic Links in Linux
    All You Need to Know About Symbolic Links in Linux Linux
  • linux tux minimalism 4k 42 2560x1700 1 1
    Warning useradd: the home directory already exists. Not copying any file from skel director into it Linux
  • linux w640 h400
    How to install and configure Ubuntu Linux on VirtualBox Linux
  • Screenshot 2022 02 25 at 02.06.20
    How to install SAMBA file shares for Servers and Clients Linux
  • how to install software packages from source files
    How to install a software package from source file in Linux Linux
  • selinux in production
    How to locate directory file context and restore it with SELinux Linux

More Related Articles

PersonalHow to Create Symbolic Links in Linux All You Need to Know About Symbolic Links in Linux Linux
linux tux minimalism 4k 42 2560x1700 1 1 Warning useradd: the home directory already exists. Not copying any file from skel director into it Linux
linux w640 h400 How to install and configure Ubuntu Linux on VirtualBox Linux
Screenshot 2022 02 25 at 02.06.20 How to install SAMBA file shares for Servers and Clients Linux
how to install software packages from source files How to install a software package from source file in Linux Linux
selinux in production How to locate directory file context and restore it with SELinux Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Featured image 1
    How and where to find your BitLocker recovery key on Windows Security | Vulnerability Scans and Assessment
  • image 29
    How to force your website to redirect from HTTP to HTTPS using a web.config file Network | Monitoring
  • Wingettool
    Install and Manage Applications with Winget Windows
  • ztre23fsas
    Grant or Deny Microphone Access on Mac Mac
  • Cyclic Redundancy
    Cyclic Redundancy: Resolve Data Error on Inaccessible Hard Drive Windows
  • 111615smarthomeNG
    Unspecified GSS failure: How to fix Clock skew too great Web Server
  • screenshot 2020 04 22 at 23.28.23
    Remove saved RDP connections in Windows Windows
  • maxresdefault
    Error 0x8007232B: Can’t activate Windows on this device as we can’t connect to your organization’s activation server Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,825 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.