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
Set the password. Note that this password is both the root account password and the user account password.
Disk 100G
Custom hardware
Start the virtual machine
Select operating system default language
Software Selection
Select time zone
Select Installation Destination
These partitions are available by default
Click the lower left corner - Delete all default partitions
The new mount point will use the following partition scheme(N): Select LVM
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
Select the file system as EXT4
Then click + in the lower left corner to create a second partition /home
Then click + in the lower left corner to create a third partition SWAP
Then click + in the lower left corner to create the fourth partition /var
Then click + in the lower left corner to create the fifth partition/boot
Then click + in the lower left corner to create the sixth partition biosboot
When adding biosboot, the remaining space is less than 2M and the biosboot partition cannot be added.
The solution is to shrink the /var partition to 13G first, so that 1G is reserved.
After adding biosboot, allocate all remaining space to /var
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.
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.
Now the partition creation is complete.
Click Finish in the upper left corner.
Click on NETWORK & HOSTNAME
Click Begin Installation
The first step is to create a custom LVM partition
Wait for the installation to complete just a moment
When the following interface appears, the installation is complete and the login is successful. The wallpaper is so cool.
Click Not Listed and enter root
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.
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.
3.2. View disk partitions
df -lTh
3.3. Check the system version
cat /etc/*release
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
3.4. Register the system to the redhat software warehouse
Default source list
Redhat official yum source cannot be used without registering the system.
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.
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
Update software source metadata
yum makecache
Now the configuration is complete and you can play happily.
EPEL software source configuration reference link https://mirrors.tuna.tsinghua.edu.cn/help/epel/