Install RHEL9 system on PVE virtualization platform
1. Introduction to RHEL9
1.1 Introduction to RHEL9
On May 18, 2022, Red Hat, which was acquired by IBM, announced the availability of Red Hat Enterprise Linux 9 (RHEL 9), the latest version of the world's leading enterprise Linux platform. RHEL 9 provides a more flexible and stable foundation to support hybrid cloud innovation, and provides a faster and more consistent experience for deploying applications and critical workloads across physical, virtual, private and public clouds and edge deployments.
1.2 New features of RHEL9
The following are some of the new functions of RHEL9. For details, please visit the official website of Red Hat.
-
Red Hat Enterprise Linux 9.0 ships with kernel version 5.14.0-70.
-
RHEL 9 will also improve performance and support more containerized applications.
-
A new platform for today's and tomorrow's developers: Completing the migration to Python 3, version 3.9 will be the default Python for the RHEL9 lifecycle.
-
RHEL 9 provides OpenSSL 3.0.1: RHEL 9 provides upstream version 3.0.1 of the openssl package, which includes many improvements and bug fixes.
-
RHEL 9 provides RPM 4.16, a new RPM plugin that notifies fapolicyd about changes during an RPM transaction.
-
New virtualization features in the RHEL web console, including renaming virtual machines, creating virtual machines using cloud image authentication, adding and removing USB and PCI devices to virtual machines, specifying network interface models, sharing and unsharing between a host and its virtual machines Features such as file sharing.
2. Upload the image to PVE storage
2.1 Check the PVE environment
Log in to PVE and check the PVE environment.
2.2 Upload image
Upload the image to PVE. The image used this time is rhel-baseos-9.0-x86_64-dvd.
3. Create a virtual machine
3.1 Set the virtual machine name
Set the virtual machine name to rhel9
3.2 Operating system settings
Select the image storage location and select the ISO image rhel-baseos-9.0-x86_64-dvd.
3.3 System Settings
Just select the default.
3.4 Disk Settings
Select the virtual machine disk and set the size to 300G, which can be adjusted according to your own needs.
3.5 CPU Settings
Set the number of CPU cores to 2, select the host mode for the CPU type, and do not select the default KVM64 for the CPU type, otherwise the installation system will report an error.
3.6 Memory Settings
Memory size selection 4G
3.7 Network settings
The network mode defaults to bridge mode, and all of them can be defaulted here.
3.8 Determine the virtual machine configuration
Check the virtual machine configuration and start creating the virtual machine.
Fourth, install the operating system
4.1 Enter the system installation interface
Select the first row to install the RHEL9 operating system.
4.2 Select system language
You can choose the system language, choose Chinese here.
4.3 Time zone setting
Set the Shanghai time zone.
4.4 Set network and hostname
Click the network and hostname option, set a static IP address, and set the hostname to jeven
4.5 System installation destination setting
- Click on the Install Destination option.
- Select a disk, select Custom for storage configuration, and click Finish to enter the manual configuration interface.
- manual disk partitioning
- The size of each partition can be allocated according to the needs. The root partition is 150G, /home is 60G, /boot is 2G, swap partition is 8G, /var is 30G, and the rest of the space is reserved.
4.6 Disable kdump function
Disable kdump function
4.7 User Settings
- Set the root password of the system, and select Allow root account ssh remote login.
- Create a user, create a new admin user, and set a custom password.
4.8 Minimal installation setup
Choose minimal install
4.9 Start to install the system
Choose to start the system installation
4.10 Restart the system
After the operating system is installed, restart the system.
Five, rhel9 initial configuration
5.1 View the local console
View the local console of the virtual machine and log in to the system.
5.2 ssh remote connection rhel9
Use the xshell tool to connect to rhel9, and the IP address is the one set when installing the system.
5.3 Check the system kernel version
Check the kernel version of the system, the kernel version is 5.14.0-70.13.1.
[root@jeven ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 9.0 (Plow)
[root@jeven ~]# uname -r
5.14.0-70.13.1.el9_0.x86_64
5.4 View python version
Check that the python version installed by default in the system is 3.9.10
[root@jeven ~]# python -V
Python 3.9.10
5.5 Configure yum warehouse
- View your system's CD/DVD drive
[root@jeven ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 300G 0 disk
├─sda1 8:1 0 2G 0 part /boot
└─sda2 8:2 0 248G 0 part
├─rhel_192-root 253:0 0 150G 0 lvm /
├─rhel_192-swap 253:1 0 8G 0 lvm [SWAP]
├─rhel_192-var 253:2 0 30G 0 lvm /var
└─rhel_192-home 253:3 0 60G 0 lvm /home
sr0 11:0 1 8G 0 rom
- create mount point
mkdir -p /mnt/dvd
- Mount the image file
[root@jeven ~]# mount /dev/cdrom /mnt/dvd/
mount: /mnt/dvd: WARNING: source write-protected, mounted read-only.
- Edit the yum repository file
[root@jeven dvd]# cat /etc/yum.repos.d/dvd.repo
[AppStream]
name=AppStream
baseurl=file:///mnt/dvd/AppStream
enable=1
gepcheck=1
gpgkey=file:///mnt/dvd/RPM-GPG-KEY-redhat-release
[BaseOS]
name=BaseOS
baseurl=file:///mnt/dvd/BaseOS
enable=1
gepcheck=1
gpgkey=file:///mnt/dvd/RPM-GPG-KEY-redhat-release
- Check yum repository status
[root@jeven dvd]# yum repolist all
正在更新 Subscription Management 软件仓库。
无法读取客户身份
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
仓库 id 仓库名称 状态
AppStream AppStream 启用
BaseOS BaseOS 启用
5.6 Install necessary tools
Install tools such as VIM
yum install tree vim net-tools -y