Basic installations in new Rhel8

Hiteshkoolwal
4 min readAug 14, 2020

--

When we install a new Rhel8 image on our PC, Generally, the yum is not configured and we have to change the setting of virtual machine for better performance.

Contents:

VM settings for Rhel8

Open settings by clicking on Rhel 8 and then click on settings.
Use this settings when you have already installed rhel8 on vm.

In System Settings Hard Disk should be at top, For that click on Hard Disk and click on up arrow.
Give a minimum 2 GB Ram, 4 GB is Recommended.

In Storage Setting check if rhel-8.0-x86_64-dvd.iso file is added to controller.

If rhel-8.0-x86_64-dvd.iso is not added to controller add it by clicking on optical drive then choose optical dist, select rhel-8.0-x86_64-dvd.iso and add the iso file.

In Network setting make your network adapter on Bridged Adapter.

Configuring yum repo for rhel8 iso file

The RHEL iso file image is at /dev/cdrom to access the contents of image, We have to mount it first.

  • mkdir /dvd
    Make a empty folder at / directory.
  • mount /dev/cdrom /dvd
    Mounting rhel image to rhel8 os but it is read only.
  • vim /etc/yum.repos.d/dvd.repo
    Configuring the dvd repo in yum.

In dvd.repo we have to write.

[dvd1]
baseurl=file:///dvd/AppStream
gpgcheck=0

[dvd2]
baseurl=file:///dvd/BaseOS
gpgcheck=0

This code means yum will go to /dvd/AppStream directory and read all the rpm packages when the user wants to install a program.
gpgcheck=0 means yum will not check for certificates that the packages come from a valid source.

  • Making the mount permanent
    Every time we reboot OS, we have to mount /dev/cdrom to /dvd manually. So, instead we write this command in a file(/etc/rc.local) that OS always runs while starting.
    vim /etc/rc.local

Press esc and then type :wq to save and exit the file
Giving Executable permission to the file so, file always runs during boot.
chmod +x /etc/rc.local

Checking if the yum configured properly
yum repolist
it will count the total no of packages in each dvd.
yum install net-tools
it will install net-tools rpm which provide ifconfig command.

Downloading and installing epel which contains more than 6k rpm packages.

  • For installing go to the location where epel rpm package has been downloaded.
    cd /root/Downloads
    if you have login-ed from root user.
    type the command to install packages.
    rpm -i epel<press_tab_button>
    epel package is installed and yum is fully configured. Now, we can easily install python3 and other programs by typing
    yum install python3 php httpd

Congratulations, now we can install any software on rhel8 by typing only one command.

--

--