vmware install centos 7.6 operating system
1. Download the centos 7.6 operating system image file
Here is the official download link for version 7.6 released in October 2018 https://vault.centos.org/7.6.1810/isos/x86_64/
The first is HTTP download.
The second is torrent. Downloading through torrent is generally faster.
File name: CentOS-7-x86_64-DVD-1810.iso
SHA256: 6d44331cc4f6c506c7bbe9feb8468fad6c51a88ca1393ca6b8b486ea04bec3c1
2. Install centos 7.6 operating system
Enter custom information
Disk 100G
Custom hardware
Start the virtual machine
Enter the installation interface as follows
Select language
Select time zone
Software Selection
Select Installation Destination
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 |
The default interface is as follows
Click on the lower left corner - Delete all partitions
New partition uses LVM
Click + in the lower left corner to create the first partition /
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 & HOST NAME
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.
Click Not Listed
Enter root
Log in successfully and the familiar smell hits your face.
3. Configure centos 7.6 operating system
3.1. Configure static IP address and dns
After the installation is complete, check the address and the address has not been set.
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.157 #静态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="692ce0e9-6f1f-47fd-b082-32f027919802"
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="692ce0e9-6f1f-47fd-b082-32f027919802"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.2.157 #静态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.
/etc/init.d/network restart
After restarting the network service, the IP address and gateway will take effect.
3.2. View disk partitions
Check the disk partition after installing the system
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
View software sources
[root@centos ~]# cat /etc/yum.repos.d/CentOS-
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@centos ~]# cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[root@centos ~]#
Get software source metadata
yum makecache
Now the configuration is complete and you can play happily.