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.

Insert image description here

File name: CentOS-7-x86_64-DVD-1810.iso
SHA256: 6d44331cc4f6c506c7bbe9feb8468fad6c51a88ca1393ca6b8b486ea04bec3c1

2. Install centos 7.6 operating system

Insert image description here

Insert image description here

Insert image description here

Enter custom information

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

Enter the installation interface as follows
Select language

Insert image description here

Insert image description here

Select time zone

Insert image description here

Insert image description here

Software Selection

Insert image description here

Insert image description here

Insert image description here

Select Installation Destination

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

The default interface is as follows

Insert image description here

Click on the lower left corner - Delete all partitions

New partition uses LVM
Insert image description here

Click + in the lower left corner to create the first partition /

Insert image description here

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 & HOST NAME

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.

Click Not Listed
Insert image description here

Enter root

Insert image description here

Insert image description here

Log in successfully and the familiar smell hits your face.

Insert image description here

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.

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.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.

Insert image description here

3.2. View disk partitions

Check the disk partition after installing the system

 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

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

Insert image description here

Now the configuration is complete and you can play happily.

Guess you like

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