vmware installs redhat 7.6 operating system

1. Download the redhat 7.6 operating system image file

Link : Panpanzwzg

File name: rhel-server-7.6-x86_64-dvd.iso
SHA-256: 60a0be5aeed1f08f2bb7599a578c89ec134b4016cd62a8604b29f15d543a469c

2. Install redhat 7.6 operating system

Insert image description here

Insert image description here

Insert image description here

Set the password. Note that this password is both the root account password and the user account password.

Insert image description here

Insert image description here

Disk 100G

Insert image description here

Custom hardware

Insert image description here

Insert image description here

Insert image description here

Start the virtual machine

Insert image description here

Insert image description here

Select operating system default language

Insert image description here

Insert image description here

Software Selection

Insert image description here

Insert image description here

Insert image description here

Select time zone

Insert image description here

Insert image description here

Select Installation Destination

Insert image description here

Insert image description here

These partitions are available by default

Insert image description here

Click the lower left corner - Delete all default partitions

Insert image description here

The new mount point will use the following partition scheme(N): Select LVM

Insert image description here

Disk 100G, use the following partition strategy

mount point Partition name Partition size Partition file system Equipment type
/ root partition 50G ext4 LVM
/home home partition 20G ext4 LVM
SWAP SWAP partition 15G SWAP LVM
/was var partition 14G ext4 LVM
/boot boot partition 1G ext4 Stand Partition
biosboot biosboot partition 2M BIOS Boot Stand Partition

Click + in the lower left corner to create a root partition

Insert image description here

Insert image description here

Select the file system as EXT4

Insert image description here

Then click + in the lower left corner to create a second partition /home

Insert image description here

Insert image description here

Then click + in the lower left corner to create a third partition SWAP

Insert image description here

Insert image description here

Then click + in the lower left corner to create the fourth partition /var

Insert image description here

Insert image description here

Then click + in the lower left corner to create the fifth partition/boot

Insert image description here

Insert image description here

Then click + in the lower left corner to create the sixth partition biosboot

Insert image description here

When adding biosboot, the remaining space is less than 2M and the biosboot partition cannot be added.

Insert image description here

Insert image description here

The solution is to shrink the /var partition to 13G first, so that 1G is reserved.

Insert image description here

Insert image description here

After adding biosboot, allocate all remaining space to /var

Insert image description here

The remaining 1022.97M space is allocated again to the /var partition

Note that the current remaining available space is displayed in the lower left corner of the page.

Insert image description here

Update the /var partition size again and allocate all remaining space to the /var partition

Scroll down the page and click Update Settings to update the size of the /var partition.

Insert image description here

Insert image description here

Now the partition creation is complete.
Click Finish in the upper left corner.

Insert image description here

Insert image description here

Click on NETWORK & HOSTNAME

Insert image description here

Insert image description here

Insert image description here

Click Begin Installation

Insert image description here

The first step is to create a custom LVM partition

Insert image description here

Wait for the installation to complete just a moment

Insert image description here

When the following interface appears, the installation is complete and the login is successful. The wallpaper is so cool.

Insert image description here

Click Not Listed and enter root

Insert image description here

Insert image description here

3. Configure redhat 7.6 operating system

3.1. Configure static IP address and dns

After installing the system, the address is not set by default.

Insert image description here

cp /etc/sysconfig/network-scripts/ifcfg-ens33  /etc/sysconfig/network-scripts/ifcfg-ens33.bak

Edit network card configuration file

vi /etc/sysconfig/network-scripts/ifcfg-ens33

①Change BOOTPROTO=dhcp to BOOTPROTO=static
②Insert the following content

IPADDR=192.168.2.158  #静态IP地址
NETMASK=255.255.255.0 #掩码
GATEWAY=192.168.2.2   #网关
DNS1=192.168.2.2      #首选DNS
DNS2=114.114.114.114  #备选DNS

Please refer to the following modification process for the network card configuration file.
Before modification

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="308d3cf9-4912-4f86-a793-2fcc353d2b9c"
DEVICE="ens33"
ONBOOT="yes"

After change

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="308d3cf9-4912-4f86-a793-2fcc353d2b9c"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.2.158  #静态IP地址
NETMASK=255.255.255.0 #掩码
GATEWAY=192.168.2.2   #网关
DNS1=192.168.2.2      #首选DNS
DNS2=114.114.114.114  #备选DNS

After the change is completed, the network service makes the change take effect.

systemctl restart NetworkManager.service

After restarting the network service, the IP address and gateway will take effect.

Insert image description here

3.2. View disk partitions

 df -lTh

Insert image description here

3.3. Check the system version

cat /etc/*release

Insert image description here

Check the kernel version gcc version glibc version
The kernel version is 3.10.0 The gcc version is 4.8.5 The glibc version is 2.17

Insert image description here

3.4. Register the system to the redhat software warehouse

Default source list
Insert image description here

Redhat official yum source cannot be used without registering the system.

Insert image description here

Preparation before registration
https://developers.redhat.com/register Open this website to register a redhat account. Use your account name and password to register the system to redhat.

subscription-manager register --username yourUserName --password yourPassWord --auto-attach

In this case, the registration failed because the network cannot resolve the domain name.
Insert image description here

Another way: use EPEL source

EPEL (Extra Packages for Enterprise Linux) is a package frequently used in Enterprise Linux (RHEL, CentOS) maintained by the Fedora Special Interest Group.

Create epel.repo file

touch /etc/yum.repos.d/epel.repo

Edit the file /etc/yum.repos.d/epel.repo and add the following content

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

Check which sources are activated

 yum repolist all

Insert image description here

Update software source metadata

yum makecache

Insert image description here

Now the configuration is complete and you can play happily.

EPEL software source configuration reference link https://mirrors.tuna.tsinghua.edu.cn/help/epel/

Guess you like

Origin blog.csdn.net/OceanWaves1993/article/details/135419619
Recommended