# Installing RHEL Linux

## About RHEL 9

- Kernel 5.14
    
- Released May 2019
    
- Built alongside Fedora 34
    
- Installer program = Anaconda
    
- Default bootloader = GRUB2
    
- Default automatic partitioning = /boot, /, swap
    
- Default desktop environment = GNOME
    

## Installation Logs

**/root/anaconda-ks.cfg** - Configuration entered during installation

**/var/log/anaconda/anaconda.log** - Contains informational, debug, and other general messages

**/var/log/anaconda/journal.log** - Stores messages generated by many services and components during system installation

**/var/log/anaconda/packaging.log** - Records messages generated by the dnf and rpm commands during software installation

**/var/log/anaconda/program.log** - Captures messages generated by external programs

**/var/log/anaconda/storage.log** - Records messages generated by storage modules

**/var/log/anaconda/syslog** - Records messages related to the kernel

**/var/log/anaconda/X.log** - Stores X Window System information

```
Note: Logs are created in /tmp and then transferred to /var/log/anaconda once the installation is finished.
```

## 6 Virtual Consoles

- Monitor the installation process.
    
- View diagnostic messages.
    
- Discover and fix any issues encountered.
    
- Information displayed on the console screens is captured in installation log files.
    

### Console 1 (Ctrl+Alt+F1)

- Main screen
    
- Select language
    
- Then switches the default console to 6
    

### Console 2 (Ctrl+Alt+F2)

- Shell interface for the root user
    

### Console 3 (Ctrl+Alt+F3)

- Displays installation messages
    
- Stores them in /tmp/anaconda.log
    
- Information on detected hardware, etc.
    

### Console 4 (Ctrl+Alt+F4)

- Shows storage messages
    
- Stores them in /tmp/storage.log
    

### Console 5 (Ctrl+Alt+F5)

- Program messages
    
- Stores them in /tmp/program.log
    

### Console 6 (Ctrl+Alt+F6)

- Default graphical configuration and installation console screen
    

Console 1 brings you to the login screen. Console 2 does nothing. Consoles 3-6 all bring you to the login screen.

## Lab Setup

### VM1

```
server1.example.com
192.168.0.110
Memory: 2 GB
Storage: 1x20 GB
2 vCPUs
```

### VM2

```
server2.example.com
192.168.0.120
Memory: 2048 MB
Storage: 1x20 GB
    4x250 MB data disks
    1x5 GB data disk
2 vCPUs
```

## Setting Up VM1

Download the ISO from Red Hat's website:

[https://access.redhat.com/downloads/content/rhel](https://access.redhat.com/downloads/content/rhel)

Name the VM **RHEL9-VM1** and accept the defaults.

Set the drive size to 20 GB.

Press **Space** to halt autoboot.

Select **Install**.

Select language.

Configure the timezone under **Time & Date**.

Go into **Installation Destination** and click **Done**.

### Network & Hostname Settings

1. Change the hostname to `server1.example.com`
    
2. Go to IPv4 Settings in **Network & Hostname** and set:
    
    - Method: Manual
        
    - Address: 192.168.0.110
        
    - Netmask: 24
        
    - Gateway: 192.168.0.1
        
    - Save
        
3. Slide the On/Off switch in the main menu to **On**
    

Set the root password.

### Change the Boot Order

1. Power off the VM.
    
2. Set the boot sequence to:
    
    - Hard Disk first
        
    - Optical Drive second
        
    - Remove Floppy
        

Accept the license terms and create a user.

SSH from the host OS using PuTTY.

Issue these commands after setup:

```bash
whoami
hostname
pwd
logout
# or press Ctrl+D
```

## Using Cockpit

- Web GUI for managing RHEL systems
    
- Comes pre-installed
    
    - If not installed:
        

```bash
sudo dnf install cockpit
```

- Enable the Cockpit socket:
    

```bash
sudo systemctl enable --now cockpit.socket
```

- Access via:
    

```
https://your-ip:9090
```

## Labs

### Lab: Enable Cockpit

```bash
sudo systemctl enable --now cockpit.socket
```

In a web browser, go to:

```
https://<your-ip>:9090
```