Creating Redhat CLI && Repository Configuration

Jagadeesh Thiruveedula
5 min readJun 24, 2020

--

Hi All, In this post I’m going to show you how to install Redhat OS with CLI and configuration of repositories.

Basically CLI os can consume less resources compared to GUI and in place of one GUI we can install multiple CLI’s.

Required stuff to go ahead.

  • Virtual Box or VM ware.
  • Redhat Image(ISO or same steps in cloud Instance also)

Installation:

Download and Install Virtual box from below, it is pretty simple next,next and finish..

https://www.virtualbox.org/wiki/Downloads

Please go and download DVD-ISO image from below link.

After installation of Virtual Box or VM ware click new

Name your Os as you like here I’m giving “red_cli” and click next.

Select RAM preferably 1GB for better performance.

Choose create virtual hard disk option as below.

Use VDI option because we are installing OS using ISO image.
Choose Dynamically allocated to extend HDD memory when limits gets exceeded it would be called as scaling

After going into settings menu go to storage and add ISO image there are below.

add ISO image in controller.

After adding close this window and click start, it will take us to installation window and follow below steps.

Language Selection

language selection

Partitioning Hard-drive

installation summary

Click on Done button then it will direct you to below window click on reclaim space.

partitioning disk for linux filesystem

KDUMP feature is for kernel debugging purpose so if we want to save some more ram we can disable KDUMP else leave as is.

Disabling KDUMP feature

Configuring Network Card.

By default it is disabled turn it ON so that it can connect to network.

enabling network connectivity

Here comes main part we’ve to select the mode of installation(GUI or CLI).

Choose Minimal Install mode it would install redhat CLI.

choosing CLI installation mode

We are all set to go click on begin installation button so it will install CLI os

While installation we can configure root password or we can add other users also.

root account config

For saving time I’ve configured root password.

configuring root password

Upon successful installation we will get below window, choose reboot or shutdown the machine.

Before switching on OS sort out the boot order else we will get same installation window again and again.

After successful reboot we are ready to use or CLI.

Redhat CLI

Repository Configuration for Redhat CLI:

why do we need repo’s?What are the uses of having repo’s?

We need repo’s for installing any software which are available in local and internet.

For Redhat we will give us around 5k software's with ISO image.

Some Software like VLC,Docker we wont get, for installing those type of software we have to configure EPEL and RPM Fusion.

Mount cdrom which has pre downloaded software to local location.

mounting cdrom to dvd location
  1. Let’s see how to configure local Repo’s
  2. go to /etc/yum.repo.d/ → cat local.repo
  3. create a file with any name but extension should be “.repo” in my case it is local.repo
  4. write content as below to configure local repo’s.
  5. Here [abc] is repo name we can give anything as we like to name.
  6. baseurl → is local location where redhat is providing software.
  7. gpgcheck → is being used to validate the software while installation, here i’m disabling it that’s why i gave ‘0’.
  8. Save file and type yum repolist it will provide the count of available software's.
local.repo

Try installing vim for validating you configuration.

yum install vim

if you try installing vlc you will get error because you won’t get it in redhat provided list of s/w’s and for getting those you’ve to do one more step as below.

Let’s configure EPEL and Fusion repo’s for fetching software which were not available in local.

Run those command’s to get EPEL and Fusion.

sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmsudo dnf install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm

Now check yum repolist you will get 5k more s/w’s in you list.

yum repolist

Now, check whether your repo was properly configured or not by trying

VLC is not available in repo’s provided by redhat.

yum install vlc

--

--