In my CentOS machine (VirtualBox VM, altough I assume this shouldn't matter), I have a directory including an RPM file and all of its dependency RPM files.I want to install the RPM along with all of its dependencies, but I want to install only using the files in this folder (not fetching the dependencies from remote repos).I want to do this in order to make sure that I have all of the dependencies in this folder.How can this be done?
How can I install a local RPM using only the local dependency RPM files?
centos;rpm
You can do this using yum, by making a .repo repository file for your collection and running yum temporarily enabling this repository while disabling the other repositories.  You might find this simplest by making a shell script to call yum while disabling the regular repositories.  Use yum repolist to get the names to disable.Something like#!/bin/shyum --disablerepo=foo $@(you can list more than one --disablerepo option).  Alternatively, you can disable all of the repositories and enable only those which you need, e.g.,#!/bin/shyum --disable-repo='*' --enable-repo=myrepo $@Further reading:yum - Yellowdog Updater Modified shows these options--enablerepo=repoidglob  Enables specific repositories by id or glob that have been  disabled in the configuration file using the enabled=0 option.  Configuration Option: enabled--disablerepo=repoidglob  Disables specific repositories by id or glob.  Configuration Option: enabledHow do I create yum repo file?How To Set Up and Use Yum Repositories on a CentOS 6 VPS[CentOS] more than one repo with --disablerepo