Red Hat Enterprise Linux is a commercial open-source Linux distribution developed by Red Hat for the commercial market. Red Hat Enterprise Linux is released in server versions for x86–64, Power ISA, ARM64, and IBM Z and a desktop version for x86–64. Fedora Linux serves as its upstream source.
Today, Red Hat Enterprise Linux supports and powers software and technologies for automation, cloud, containers, middleware, storage, application development, microservices, virtualization, management, and more.
Objective: To run Rhel in CLI mode(Minimal Installation) if we have Less Computing Unit i.e. RAM and CPU
here we are using Redhat version 8
- Operating System ( I am using RHEL-8) locally over Oracle Virtual Box, you can also launch OS on any cloud ex. AWS as well , here also also using rhel in CLI mode to save the memory
- Configure yum
Create a new VM.
Click on New: To create new VM
Now Click on create to Launch VM , Go to Setting → Storage →attach ISO file for Rhel
After that Do the Following steps for Installation (CLI)
Imp: Choose Minimal Installation as Shown:
- Set Root Password
- Click on begin the installation and wait as it will take some time for installation.
After Setup Done our VM is ready to configure
Starting your VM
Now , start you VM and login into it.
# free -m (we see just in 166 Mib complete OS is launch )
why configure yum?
- Now if we run ifconfig or vim command it is not working, because this OS have limited or basic program , it’s not mean that this command doesn’t exist
- As all the command that we run is one kind of program and all the program is one kind of software and in Rhel the software is know as rpm(Redhat package manager)
- So if some command is not working , find the name of the software and install it, and how to install → by using yum command
- that’s why we have to configure yum
- right now we don’t have yum configured , as whenever we install rhel using GUI/CLI yum is not configured
# ifconfig or vim etc.
# yum repolist : we see No repository available
Note: Don’t confuse with the initial lines i.e. not registered with the Subscription , we don’t required any subscription from the Redhat
Note: if we use cloud yum is already configured
How to configure yum
- As yum required software, here software is known as rpm
- we have 6000+ software available but where? , it over DVD/ CD- ROM and its a device
- if yum want Yum go to your CD-ROM → Download/retrieve the software and install it, how? , Technically we can’t do because CD-ROM/ DVD is a device, which kind of device, its a Storage Device
- if we have any kind of storage device, we can mount this storage device in one folder(/folder) and if we mount all data of this device is linked
Note: we are not copying the data ,we are linking the device, so if CD-ROM is 6-Gib all the data are linked , that’s why they are so fast
- now we can tell yum , that, this is the folder where yum have all the rpm and where all the rpm available called repository
# mkdir /dvd
# mount /dev/cdrom /dvd
# cd /dvd
we see all the content of yum but here 2 folder AppStream and BaseOS which contains all my softwares.
Note : After yum mount if you don’t see any data make sure your CD-ROM and iso file is attached, if not Poweroff your VM and attach it
Now , configure
# vi /etc/yum.repos.d/adi.repo (.repo is fixed)
- / / / (triple slash not double)
- AppStream and BaseOS becauce all the software are present
Now, if we check
# yum repolist ( we see 6000+ software)
Now to install any software we have to know the name of the software, How ? let I want to install ifconfig
# yum whatprovides ifconfig ( we see name of the software i.e net-tools)
# yum install net-tools
we are able to see the ip because we already activated network card while installing the OS
Note: As we have mounted our CD-ROM , we can check using the command
# df -h (we see sr0 is one kind of CD-ROM)
Note: when we mouned /dev/cdrom , here /cdrom is just a name they have given to you , but actual name of CD-ROM is sr0 and this CD-ROM we have mounted to the /dvd
Important: whatever you mount either pendrive, CD-ROM or NFS this mount is temporary in nature means if you reboot this system , it automatically unmount
To mount the permanently there is 2 way
- using fstab
- 2nd way (we use)
whenever there is a requirement, if you reboot the system to start and before login if we want to run any program , there is a file which run automatically when the system start/reboot or before we see login screen, the name of the file is /etc/rc.d/rc.local
# vi /etc/rc.d/rc.local
Note: Here you can write any command or script that you want to run before login
because this is a script so we need to execute it, as command is also given in the screen-shot
# chmod +x /etc/rc.d/rc.local
Now if you reboot also your yum is configured
Note: we have installed rhel in CLI mode , so you you try to install any GUI program it will install but not able to start
we have seen that , if we have less RAM also we can use Rhel in CLI mode(Minimal Installation) , here we have also seen that how to configure yum
Aditya kumar Soni