How to Install wget on RHEL 6

wget is a command-line tool used for downloading files from the internet. RHEL 6 is a version of the Red Hat Enterprise Linux operating system that is still in use in some environments. In this guide, we will show you how to install wget on RHEL 6.

Step 1: Check if wget is already installed

The first step is to check if wget is already installed on your system. Run the following command in your terminal:

wget

If wget is already installed, you will see a message that says “wget: missing URL”. If wget is not installed, you will see an error message.

-bash: wget: command not found

Step 2: Enable the EPEL Repository

wget is not included in the default RHEL 6 repository, so you need to enable the EPEL (Extra Packages for Enterprise Linux) repository. Run the following command:

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

This command will download and install the EPEL repository.

See also  How to Add Persistent Static Routes on RHEL 6/CentOS 6

Step 3: Install wget

Now, you can install wget using the following command:

sudo yum install wget

This command will download and install wget and any dependencies it requires.

[root@rhel6 ~]# yum install wget -y
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package wget.i686 0:1.12-1.4.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package          Arch             Version                   Repository                        Size
====================================================================================================
Installing:
 wget             i686             1.12-1.4.el6              DVD-RHEL6-Repository             481 k

Transaction Summary
====================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 481 k
Installed size: 1.8 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : wget-1.12-1.4.el6.i686                                                       1/1

Installed:
  wget.i686 0:1.12-1.4.el6

Complete!

Step 4: Verify the Installation

Once the installation is complete, you can verify that wget is installed by running the following command:

wget --version

This command will display the version of wget that is installed on your system.

See also  How to Create the tar file then gzip the file on RHEL 6

Commands Mentioned:

  • wget – Check if wget is installed
  • sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm – Enable the EPEL repository
  • sudo yum install wget – Install wget
  • wget –version – Verify the installation

Conclusion

In this guide, we have shown you how to install wget on RHEL 6. By following these steps, you can download files from the internet using the wget command-line tool. We hope this guide has been helpful to you. If you have any comments or suggestions for improvements, please feel free to share them below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *