OS: Redhat8.4实体机的安装

OS:  Redhat8.4实体机的安装

 

 

 

 

一、制作USB安装盘(Linux 系统)

 

 

1、查询U盘设备名称:fdisk -l  (l,L;/dev/sdb);

2、卸载u盘:umount  /dev/sdb*

3、格式化u盘:mkfs.vfat  -I  /dev/sdb  (I, i)

4、制作安装盘:dd   if=rhel-8.4-x86_x64-dvd.iso       of=/dev/sdb

5、等待,安装盘制作完成。

 

 

 

 

二、bios设置

 

 

1、关闭“多线程”(必选),否则无法安装redhat8.4;

2、boot模式:uefi(必选,uefi + gpt分区表);

 

 

 

 

三、硬盘分区

 

 

Redhat8.4系统安装--GPT分区表--硬盘分区(硬盘容量2T)
分区编号 挂载点 容量 设备类型 文件系统
1 /boot 1024MB(固定大小) 标准分区 xfs
2 /boot/efi 1024MB(固定大小) 标准分区 EFI System Partition
3 swap 10GB(最少2GB) LVM swap
4 /home 100GB(最少20G) LVM xfs
5 / 剩余空间(最少20G) LVM xfs

 

 

四、redhat基本配置

 

 

1、dnf 包管理器配置

        1)说明:不配置包管理器,dnf不能使用;

        2)配置方法:vim    /etc/dnf/plugins/subscription-manager.conf;

        3)设置:enabled=0

        4)保存退出;

 

 

2、dnf本地源配置;

        1)建立文件夹,保存本地源:mkdir   -p    /media/redhat;mkdir   -p    /media/tmp

        2)挂载光盘:mount    /dev/sda1    /media/tmp

        3)将光盘全部内容复制到文件夹 /media/redhat:cp  -r    /media/tmp/*    /media/redhat

        4)本地源文件:redhat-local.repo

 

[root@redhatos ~]#  cat     /etc/yum.repos.d/redhat-local.repo
# redhat-local.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.

 

[local-baseos]
name=Redhat - local - BaseOS
baseurl=file:///media/redhat/BaseOS
file:///media/cdrom/BaseOS
file:///media/cdrecorder/BaseOS
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

[local-appstream]
name=Redhat - local - AppStream
baseurl=file:///media/redhat/AppStream
file:///media/cdrom/AppStream
file:///media/cdrecorder/AppStream
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@redhatos ~]#

 

 

3、CPU频率配置

        1)说明:为了省电,需要cpu频率动态变化。

        2)cpupower    -c all    frequency-set    -d 800MHz    -u 2.6GHz    -g powersave

 

 

4、Fan配置(本方法无效,redhat8.4找不到pwm1文件):

        1)说明:风扇太吵,需要降低风扇转速减少噪声。

        2)Fan的速度控制文件路径(pwm1内的数值区间为85:0 ~ 255;1风扇速度最慢,255风扇速度最快): /sys/class/hwmon/hwmon2/pwm1

        3)脚本的名字和内容如下:fancontrol.sh

 

 1 [root@novice sh]# cat fancontrol.sh   
 2 #!/usr/bin/bash
 3 
 4 
 5 
 6 # author=lidawei, date=2021-06-01
 7 # filename=fancontrol.sh
 8 # function: control the fan speed.
 9 # parameter 'fan_speed' : 0 ~ 255, default: 85
10 # parameter 'fan_speed' sugesting : 60 ~ 230, default: 85
11 
12 
13 
14 # check 'fan_speed' parameter.
15 
16 while true :
17 do
18         read  -p "Input the fan_speed ( 60 ~ 230 ):"    fan_speed
19 
20         if [[ fan_speed -gt 60  &&  fan_speed -lt 230 ]]
21         then
22                 break
23         else
24                 echo "The number is not in (60 ~ 230), please input again . "
25         fi
26 done
27 
28 
29 # Please find the file(pwm1)  which controls your fan speed, 
30 # then substitute '/sys/class/hwmon/hwmon2/pwm1'.   
31 # echo ${fan_speed} | sudo tee /sys/class/hwmon/hwmon2/pwm1
32 
33 # Testing code for fan_speed
34 echo ${fan_speed} | sudo tee /root/lidawei/fan_speed_test
35 
36 [root@novice sh]# 

 

本文由lnlidawei(https://www.cnblogs.com/lnlidawei)原创或整理,转载请注明出处。
原文地址:https://www.cnblogs.com/lnlidawei/p/14820158.html