01Installation - amagerard/TemplateVM GitHub Wiki

RedHat9/TemplateVM.

1- Installation 2- Network 3- Firewall 4- Selinux
5- Logs 6- Certificates 7- Mail 8- PassphraseSSH
9- Sudo 10- GnomeShell 11- CloneVM 12- Volume
13- Troubleshoot 14- Proxmox

1. Installation Red Hat 9.

1.1 Prerequisites.

  • Good knowledge of the Redhat packages.
  • Have a Red Hat developer account.
  • Hypervisor esxi 8.
  • Iso : rhel-9.6-x86_64-boot.iso.
  • Guest OS Version: Red HAT 9 Enterprise 64b.
  • Boot parameter: EFI.
  • Unlock Activate or not UEFI secure starter for this VM.

Name : TemplateVM.
40G dynamic disk.
RAM : 4G.

1.2 Installation Summary.

1.2.1 Disk partition.

  • System - Installation destination - Storage destination - Choose custom.
  • Start the partitioning from top to bottom of the table.
  • Choose for the LVM type: LVM (IMPORTANT).
  • (*)Change rhel volume group to "vgl0" -Raid Level None- Size policy Automatic.
  • (**)To end with "/home", change the Size policy of vgl0 to as large as possible.
  • Click on “Done” to finish.
Mounting point Desired Capacity Device Type File System Volume Group Label Name
/boot/efi 100M standard efi system boot-efi
/boot 1G standard Ext4 boot
swap 4G standard swap swap
(*)/ 10G LVM EXT4 vgl0 root root
/usr/local 2G LVM EXT4 vgl0 usrlocal usrlocal
/opt 2G LVM EXT4 vgl0 opt opt
/var 4G LVM EXT4 vgl0 var var
/var/log 2G LVM EXT4 vgl0 varlog varlog
(**)/home 2G LVM EXT4 vgl0 home home

1.2.2 Other settings.

Root account : enable root account. Allow root ssh with password.
User creation: require a password. No add administrative privileges.
Connect to Redhat:give your Red Hat developer account.
Sofware Selection: Only Server.

1.3 First start.

You should get what is shown below.
If it is not good, you will have to start the installation again.

pvdisplay  
 --- Physical volume ---  
  PV Name               /dev/sda4  
  VG Name               vgl0  
  PV Size               34,90 GiB / not usable 2,00 MiB  
  Allocatable           yes   
  
vgdisplay vgl0  
 Alloc PE / Size       5632 / 22.00 GiB  
 Free  PE / Size       3302 / <12,90 GiB  

1.4 Configuration Red Hat 9.

1.4.1 Installation of default packages.

There is no sudo. You are root.
subscription-manager repos --enable "rhel-9-for-x86_64-supplementary-rpms" --enable "codeready-builder-for-rhel-9-x86_64-rpms" --enable "rhel-9-for-x86_64-highavailability-rpms"
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

dnf update
You have this message.
This system is registered with a rights server, but does not receive updates.
You can use subscription-manager to assign subscription.

RedHat may ask you to make a new subscription.
subscription-manager register --username <username> --password <password> --auto-attach --force

dnf update

dnf install net-tools nmap telnet vim bind-utils rsyslog-logrotate pinentry wget

1.4.2 Delete console messages.

dmesg –D no console messages.
dmesg –E messages on the console.
Suppress console messages on startup.
vi /etc/sysctl.conf

#Add the line  
kernel.printk = 2 4 1 7  

Activate immediately sysctl -p otherwise reboot.

1.4.3 Allow SSH Access.

vi /etc/ssh/sshd_config

# add or change  
#to forbid root  
PermitRootLogin no  
#allow only that for you  
AllowUsers <your username>  

systemctl restart sshd

If your network has a DHCP server and your virtual machine has recovered an IP address.
Now.

  • Note the IP Virtual Machine address with ifconfig.
  • restart the virtual machine.
  • Connect from a SSH connection to your remote computer.

1.4.4 Configuring the NTP Client.

vi /etc/chrony.conf
This example is for France.

#Change the line 'pool.2.rhel.pool.ntp.org    iburst':  
#Example from the France.  
pool   fr.pool.ntp.org    iburst  
#add to the end:  
#listen only host  
allow 127.0.0.0/8  

systemctl restart chronyd

1.4.4.1 Check Time Zone.

timedatectl
Example: Changing Time Zone.
timedatectl list-timezones 
timedatectl set-timezone Australia/Sydney

⚠️ **GitHub.com Fallback** ⚠️