Table of Contents
In this article, I will take you through the steps to install all dependent packages without internet on RedHat/CentOS 7 with the help of an example. Sometimes your server resides in private network with no connection to outside world. For installing packages you cannot use yum to download and install all dependent packages from the repository. For those scenarios, you need to follow below steps.
Install All Dependent Packages
Step 1: Prerequisites
Here we will take an example of SNMP Package where we needed to install net-snmp package along with its dependent packages. Before we go through the steps to install all dependent packages, you need to have all packages downloaded and kept in one directory. Here i have compressed the packages in .tar.gz format to reduce the size which will help in quickly uploading the packages to the Server.
Note: – To find all the required dependent package, you can do yum install net-snmp. It will give you all the dependent package names with correct version required. You can further search those packages from https://rpmfind.net and download.
Step 2: Untar all the files
We have kept packages.tar.gz file under /tmp directory. We will go and untar it here.
[root@localhost ~]#cd /tmp [root@localhost tmp]#tar -xvf packages.tar.gz
Step 3: Go the directory
Go to packages directory.
[root@localhost ~]#cd /tmp/packages
Step 4: Install all the Packages
Using -Uvh switch install all the packages using rpm command.
[root@localhost packages]#rpm -Uvh *
Preparing... ################################# [100%]
Updating / installing...
1:perl-parent-1:0.225-244.el7 ################################# [ 3%]
2:perl-HTTP-Tiny-0.033-3.el7 ################################# [ 6%]
3:perl-podlators-2.5.1-3.el7 ################################# [ 9%]
4:perl-Pod-Perldoc-3.20-4.el7 ################################# [ 12%]
5:perl-Pod-Escapes-1:1.04-294.el7_6################################# [ 15%]
6:perl-Text-ParseWords-3.29-4.el7 ################################# [ 18%]
7:perl-Encode-2.51-7.el7 ################################# [ 21%]
8:perl-Pod-Usage-1.63-3.el7 ################################# [ 24%]
9:perl-constant-1.27-2.el7 ################################# [ 27%]
10:perl-Carp-1.26-244.el7 ################################# [ 30%]
11:perl-Exporter-5.68-3.el7 ################################# [ 33%]
12:perl-Filter-1.49-3.el7 ################################# [ 36%]
13:perl-libs-4:5.16.3-294.el7_6 ################################# [ 39%]
14:perl-macros-4:5.16.3-294.el7_6 ################################# [ 42%]
15:perl-File-Path-2.09-2.el7 ################################# [ 45%]
16:perl-File-Temp-0.23.01-3.el7 ################################# [ 48%]
17:perl-PathTools-3.40-5.el7 ################################# [ 52%]
18:perl-Scalar-List-Utils-1.27-248.e################################# [ 55%]
19:perl-Socket-2.010-4.el7 ################################# [ 58%]
20:perl-Storable-2.45-3.el7 ################################# [ 61%]
21:perl-threads-1.87-4.el7 ################################# [ 64%]
22:perl-threads-shared-1.43-6.el7 ################################# [ 67%]
23:perl-Time-HiRes-4:1.9725-3.el7 ################################# [ 70%]
24:perl-Pod-Simple-1:3.28-4.el7 ################################# [ 73%]
25:perl-Getopt-Long-2.40-3.el7 ################################# [ 76%]
26:perl-Time-Local-1.2300-2.el7 ################################# [ 79%]
27:perl-4:5.16.3-294.el7_6 ################################# [ 82%]
28:net-snmp-libs-1:5.7.2-43.el7 ################################# [ 85%]
29:lm_sensors-libs-3.4.0-8.20160601g################################# [ 88%]
30:net-snmp-agent-libs-1:5.7.2-43.el################################# [ 91%]
31:perl-Data-Dumper-2.145-3.el7 ################################# [ 94%]
32:net-snmp-1:5.7.2-43.el7 ################################# [ 97%]
33:net-snmp-utils-1:5.7.2-43.el7 ################################# [100%]
Step 5: Verify the Installation
Once all the packages installed, check if it is installed or not by querying the package from rpm database.
[root@localhost packages]# rpm -qa | grep -i net-snmp
net-snmp-libs-5.7.2-43.el7.x86_64
net-snmp-agent-libs-5.7.2-43.el7.x86_64
net-snmp-5.7.2-43.el7.x86_6
Congratulations!!! You have successfully installed the packages without using yum tool.
Also Read: How to Install or Enable ssh on Ubuntu
Reference: More on Dependent Packages