Pages

Red Hat Linux 8.2 Installation

In previous blog we have seen how to install and create a new VM in Oracle VirtualBox, if you have not read it, you can check Setup VM for DB2 LUW installation post. In this post we will install Red Hat Enterprise Linux (RHEL) 8.2 on Oracle VirtualBox VM and configure RHEL for DB2 installation.

Step1: Download RHEL 8.2

You can download RHEL from Red Hat Linux website. You would need a Red Hat account to download RHEL. If you do not have a Red Hat account you can create free of cost account from Red Hat Account. RHEL 8.2 DVD ISO file size is 8 GB. As part of Red Hat Developer program you can download any RHEL version which is currently supported by Red Hat including version 5 and 6. This RHEL product must only be used for development and not for production.

Step2: Configure VM to boot RHEL 8.2 installation DVD

Open Oracle VirtualBox, select your VM and click on Settings button

Oracle VirtualBox VM Settings screen
























In Settings click on Storage button, under Controller : IDE select Empty and click on disk icon present at the end of Optical Drive : field. Click on Choose a disk file... to get an option to browse for .iso file. 



In browse window select your .iso file and click on open.

Oracle VirtualBox Storage Setting Screen
































You would see your .iso file under Controller : IDE. Click on OK button.

Oracle VirtualBox Start VM

Right click on your VM and select Start and then select Normal Start to boot your VM.

Step3: Install RHEL 8.2 on your VM

Red Hat Enterprise Linux Installation Screen

































Once VM boots you will see Red Hat Enterprise Linux 8.2 installation screen. On this screen with the help of arrow key on your keyboard select Install Red Hat Enterprise Linux 8.2 and hit Enter Key on your keyboard.

Red Hat Enterprise Linux Installation Screen































You would get similar screen indicating Stop and Start of process, after couple of minutes you would get a GUI screen.

Red Hat Enterprise Linux Installation Screen































In this screen you can modify keyboard layout and language for installation, by default keyboard layout is US and language is English (United States). 

Click on Continue button.

Red Hat Enterprise Linux 8.2 Installation Screen



Click on Time & Date to update timezone and correct date & time. You should also enable Network Time by default it is disable.

Click on Installation Destination to setup disk partition.

RHEL 8.2 Installation Destination Screen






























Select Storage Configuration as Custom, click on Full disk summary and boot loader... and select disk as boot disk.

Click on Done button.

RHEL 8.2 Manual Partitioning screen































Click on + button to create new partition. You can create 3 partition namely / with 10240 MB size, /opt with 5120 MB size and /tmp with 5120 MB size.

Click on Done button.

RHEL 8.2 Manual Disk Partition Screen


Click on Accept Changes

Red Hat Enterprise Linux 8.2 Installation Screen

Click on Network & Host Name to configure hostname and network configuration.

RHEL 8.2 Network & Hostname


You can update Host Name by editing Host Name field.
Click on Configure... button for network configuration.

RHEL 8.2 Installation Network Configuration screen


Click on IPv4 Settings, select Method as Manual instead of Automatic. You should have static IP for you VM. In Addresses field update new static Address, Netmask and Gateway. You can also update DNS servers.

Click on Save.

RHEL 8.2 Installation Network & Host Name screen


Click on OFF button to change it to ON.
Click on Done button.

RHEL 8.2 Installation Summary Screen


Click on Begin Installation.



Click on Root Password to set password for Root user.

RHEL 8.2 Root Password screen

Update your Root Password, ensure that Root Password is strong.
Click on Done button.

RHEL 8.2 Installation Configuration Screen



Click on User Creation button to create additional user.

RHEL 8.2 Installation Create User Screen

Update Full Name, User name and set password for your new user.

Click on Done



In this screen you will see progress of RHEL installation. It might take up-to 30 to 45 mins.

RHEL 8.2 Installation Configuration screen

On successful installation completion you would get above screen. 
Click on Reboot to reboot your VM.

After Reboot you get Initial Setup screen

RHEL 8.2 Installation Initial Setup screen


Click on License Information to accept License agreement.
Click on FINISH CONFIGURATION button.

After clicking on FINISH CONFIGURATION, your VM will restart. During restart do not press any key, wait till RHEL boots and you get below login screen.

RHEL 8.2 Login Screen


At this point you can login to VM using login screen. Connection to VM using PuTTY will not work as RHEL firewall will be blocking all traffic.

On this screen you can click on Not listed? to switch your login as root and connect as root.

RHEL 8.2 Login Screen


Enter root in Username: field and click on Next button

RHEL 8.2 Login Screen



Enter password for root user in Password: field and click on Sign In button.

RHEL 8.2 Home Screen



Step4: Configure RHEL 8.2 for DB2 installation.

Now we have RHEL installed on our VM but it is not ready for DB2 installation. We need to complete additional configuration to make RHEL read for DB2 installation. As part of additional configuration we will disable RHEL firewall, configure /etc/hosts for name resolution, configure RHEL repository and install prerequisite packages.

Disable RHEL firewall:

Firewall needs to be disable to allow traffic in/out of your VM.

To disable firewall open terminal after logging into VM.

Click on Activities, click on Terminal icon to open terminal

RHEL 8.2 Open Terminal

After opening terminal check if your VM IP and your gateway is reachable using ping command.

RHEL 8.2 Terminal Screen


RHEL firewall is blocking all incoming, outgoing traffic hence ping to gateway IP fails. We will use below commands to stop, disable, firewall service and check firewall status.

Stop Firewall service : systemctl stop firewalld.service
Disable Firewall service :  systemctl disable firewalld.service
Check Firewall service status : systemctl status firewalld.service

RHEL 8.2 disable firewall service



After disabling firewall service ping your Gateway IP and DNS server (8.8.8.8) to check connectivity. You can also ping your VM IP from your local system.

RHEL 8.2 ping response


You can try connecting to VM using PuTTY.

RHEL 8.2 Putty Connection



Configure /etc/hosts for hostname resolution







In /etc/hosts we need to add entry of hostname and ipaddress. You can use VI or any other text editor to edit /etc/hosts file.

RHEL 8.2 edit /etc/hosts file








Configure RHEL repository 


Before making configuration changes you need to ensure that RHEL DVD ISO is mapped to your VM. In your VM click on Machine from Menu bar and click on Settings. Under Storage you would see RHEL DVD ISO file is mapped. If .iso file is not mapped check Step2 for instruction to map .iso file.

Oracle VirtualBox VM Storage setting








































Login to your VM using Putty and run below command to check repository list.

yum repolist all

yum repolist all output

We will map an offline repository to our RHEL installation. for that first we need to mount our RHEL DVD in our VM.

mount /dev/sr0 /mnt

mount /dev/sr0 /mnt output





Use df -h /mnt  command to view newly mounted FS.

df -h /mnt output


Check if media.repo file exists.

ls -ld /mnt/media.repo

ls -lrt /mnt/media.repo output


Check if /etc/yum.repos.d directory exists.

ls -ld /etc/yum.repos.d

ls -ld /etc/yum.repos.d output





Copy /mnt/media.repo to /etc/yum.repos.d

cp /mnt/media.repo /etc/yum.repos.d/rhel8dvd.repo

cp /mnt/media.repo /etc/yum.repos.d/rhel8dvd.repo output








Change permission on file /etc/yum.repos.d/rhel8dvd.repo

chmod 644 /etc/yum.repos.d/rhel8dvd.repo

chmod 644 /etc/yum.repos.d/rhel8dvd.repo output








Edit /etc/yum.repos.d/rhel8dvd.repo to add below content

[InstallMedia-BaseOS]
name=Red Hat Enterprise Linux 8 - BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[InstallMedia-AppStream]
name=Red Hat Enterprise Linux 8 - AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 

rhel8dvd.repo file output









Updated rhel8dvd.repo file output






















Use below command to clean subscription manager.

yum clean all
subscription-manager clean

subscription-manager clean output











Run below command to check packages in repository

yum  --noplugins list

yum  --noplugins list output

Check repository list and status

yum  repolist all

yum repolist all output












If you have observed while logging to VM using PuTTY or directly in VM screen, also in above commands we are getting message This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. If you want you can disable this message by editing /etc/yum/pluginconf.d/subscription-manager.conf file. Update enabled to 0 from 1. 

Update /etc/yum/pluginconf.d/subscription-manager.conf file

After updating /etc/yum/pluginconf.d/subscription-manager.conf , we are not getting the message.








Install DB2 prerequisite packages.

We need to install below 3 packages to meet all DB2 prerequisite

yum install ksh
yum install pam-devel.i686
yum install libstdc++.i686
yum install perl-Sys-Syslog (required for TSAMP)
yum install python3-dnf-plugin-versionlock (required for PACEMAKER)
 
yum install ksh












yum install pam-devel.i686













yum install perl-Sys-Syslog













yum install libstdc++.i686













Step5: DB2 prerequisite check and DB2 Installation.

./db2prereqcheck -v 11.5.4.0 -i

db2prereqcheck -v 11.5.4.0 -i




























To install DB2 using db2_install command check blog DB2 11.1 Installation on Linux
To install DB2 using db2setup command check blog DB2 11.1 GUI Installation on Linux




If you liked this blog and interested in knowing more about DB2, please subscribe by clicking on Subscribe to ChoudharySumit.com by Email.

5 comments:

  1. @author When I try to download Linux after creating the account it shows access denied.

    When I click on download it goes on a page where it says we need a little more information and after submitting that form it show error 'Access denied'.

    Access Denied
    You don't have permission to access "http://sso.redhat.com/AK_PM_VPATH0/" on this server.

    Reference #18.2a210f17.1601142596.7643c75


    ReplyDelete
    Replies
    1. You can try accessing URL in Google Chrome Incognito mode or Edge InPrivate window. If it still does not work, then try directly accessing url https://developers.redhat.com/products/rhel/download

      Delete