How to install Linux CentOS 7.7 system in Vmware, and it is a minimal installation. Then make necessary configuration changes and implement basic optimizations. Finally take a snapshot. Install Linux CentOS 7.7 Installation requirements: The installed virtual machine is used as a server, so the installation should be minimal. Do not install any unnecessary software or a graphical interface. How to create a virtual machine, see: "How to create a virtual machine and set up a virtual machine network in VMware" Start the virtual machine Install CentOS 7 Select (use the up and down keys to switch options) the first one, install CentOS 7 Keyboard and language selection Select the keyboard mode, language and country (for example: American English, British English, Indian English, Australian English, Canadian English, etc.) Select time zone Select: Asia/Shanghai Software Installation Minimal installation Disk partitioning Manual partitioning /boot partition disk size allocation / Root partition disk size allocation The result after partitioning Partitioning takes effect Install the system and set the root password System configuration modification Note: After installation, there is no ifconfig command Hostname modification Do not use the default hostname [root@localhost ~]# vim /etc/hostname zhang [root@localhost ~]# hostname zhang After the operation is completed, log in again and you will find that the hostname has been changed. Network card modification The default network card name is not eth0, eth1. Therefore, modifications need to be made. Modify the grub file and take effect Modify the /etc/default/grub file and add net.ifnames=0 to the variable GRUB_CMDLINE_LINU to disable the new naming rule. [root@zhang ~]# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="net.ifnames=0 crashkernel=auto spectre_v2=retpoline rhgb quiet" GRUB_DISABLE_RECOVERY="true" After saving, you need to regenerate the grub configuration file and update the kernel parameters. To do this, we need to run: # grub2-mkconfig -o /etc/grub2.cfg # The result is as follows Rename the network card and modify the file configuration Rename NIC # cd /etc/sysconfig/network-scripts/ # mv ifcfg-ens33 ifcfg-eth0 # mv ifcfg-ens37 ifcfg-eth1 eth0 (intranet) file content after modification [root@zhang network-scripts]# cat ifcfg-eth0 DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPV6INIT=yes USERCTL=no IPADDR=172.16.1.100 NETMASK=255.255.255.0 eth1 (external network) file content after modification [root@zhang network-scripts]# cat ifcfg-eth1 DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPV6INIT=yes USERCTL=no IPADDR=10.0.0.100 NETMASK=255.255.255.0 GATEWAY=10.0.0.2 DNS1=223.5.5.5 DNS2=223.6.6.6 Remark: eth1's IPADDR=10.0.0.100 is used as the external IP. Since it is a virtual machine created by VMware on a personal computer, there will be no real public IP configuration. Therefore, the 10.0.0.0/8 network segment was used as the external IP. GATEWAY=10.0.0.2 is set globally in the VMware virtual machine. See: "How to create a virtual machine and set up a virtual machine network in VMware" DNS1=223.5.5.5 and DNS2=223.6.6.6 are the DNS addresses of Alibaba Cloud. It is best not to use Google's 8.8.8.8, because this foreign IP may be restricted. # systemctl restart network.service Restart the network card service to make it effective. ifconfig installation It can be seen that the Internet is normal How to Install ifconfig Command # yum search ifconfig # Check which tool package the command is in # yum install -y net-tools Execute ifconfig command After installation, system basic optimization
Specific optimization points:
Snapshot management [Important ★★★★★] After completing the above steps, the entire Vmware Linux CentOS 7.7 deployment is actually complete. But there is another important step that must be completed. We use this virtual machine as a template. Other virtual machines are cloned from this virtual machine, and the cloned state is the current state of the virtual machine. This is also to ensure that the current state of the virtual machine can be restored even if it is changed. So we need to make a snapshot to save the current state of the virtual machine. Shut down the client. To save disk space, we shut down the computer first and then take a snapshot. Select Snapshot Management Enter a snapshot name and description. It must be meaningful, otherwise after a long time you won’t know what it is. Snapshot completed Related Reading 「How to create a virtual machine and set up a virtual machine network in VMware」 This is the end of this detailed tutorial on how to install Linux CentOS 7.7 system with VMware. For more information about installing CentOS 7 with VMware, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Summary of solutions for MySQL not supporting group by
>>: Example of making XML online editor using js
Recently, I have a project that requires using ifr...
Use MySQL proxies_priv (simulated role) to implem...
Table of contents 1. View hook 1. Things to note ...
Be careful when listening for events that are tri...
In the Linux system, environment variables can be...
I have previously written an article about file t...
Introduction MySQL should be a very common databa...
1. The difference between Http and Https HTTP: It...
This article example shares the specific code of ...
1. Implement a simple triangle Using the border i...
The problems and solutions encountered when insta...
Table of contents 1. Setup 1. The first parameter...
1. Create the backup.sh script file #!/bin/sh SOU...
I have been using the CentOS purchased by Alibaba...
The elements in an HTML document are arranged one...