If your system is not registered to Red Hat Subscription Management, you won’t use yum for installing packages but you can create a local repository and you can use ..
Firstly, copy packages that is located on your Rhel DVD to your server.It will be your local repository.If you want, you can add other additional rpm files to your folder

Then, you should install below rpm’s respectively.

Then, we will create local repository with below command;

We will add our repository to list.

Now, you can test installing packages with vim.

image