Section 1 Installation Plan
The basic idea is to use virtual machine software such as VMWare to create a "virtual computer" and install the Linux system on the virtual machine.
- Install vm software
- Create a virtual machine space through vm software
- Use vm software to install our Centos operating system on the created virtual space
- Using Centos
Section 2 vmware download and installation and centos download
1.vmware software
①Download
②Installation
-
Installation preparations
- Before installation, first check whether the current physical machine has virtualization support enabled. You
can go to Task Manager-》Performance=》cpu to check whether virtualization has been enabled.
- Before installation, first check whether the current physical machine has virtualization support enabled. You
-
Steps to enable virtualization support
- You need to enter the BOIS interface to open this setting.
Each computer of different brands has different methods of entering the BIOS. Some (f2, f10) need to be tried repeatedly according to the actual situation. For
details , please refer to the address.
- You need to enter the BOIS interface to open this setting.
There are no special settings during the vmware installation process, just install it normally.
2.centos download
CentOS official website download is very slow. You can use some domestic system mirror sites to download.
NetEase mirror http://mirrors.163.com/Sohu
mirror http://mirrors.sohu.com
University of Science and Technology of China http://mirrors.ustc.edu.cn/
Alibaba Cloud https://developer.aliyun.com/mirror/Zhejiang
University http://mirrors.zju.edu.cn/
centos official website https://wiki.centos.org/Download (not recommended for slow downloads)
7.0 official website download address
7.6 official website download address
7.0 NetEase download address http://mirrors.163.com/centos/7/isos/x86_64/
Section 3 Create a virtual machine in VMWare
How to check the total number of cores of a physical machine:
Open Resource Monitor->CPU in Task Manager->Open the page
1. Three modes of network connection during virtual machine installation
In the picture, Zhang San is in bridge mode and Wang Wu is in NAT mode.
Host mode cannot access the external network.
NAT mode
. In NAT mode, the virtual machine communicates with your local machine through the virtual network card of VMware8. When the virtual machine accesses other real hosts in the same LAN where the host is located, it needs to go through the VMware8 network card. The address must be translated to communicate, and conversely, other real hosts cannot access the virtual machine. In addition, virtual machines virtualized by the same VMware8 network card can communicate with each other because they are on the same network segment.
Section 4 Installing CentOS system
Password generation address
Password generation tool address: https://suijimimashengcheng.bmcx.com/
1. centos system installation
It is recommended to turn off kdump in the learning environment
There are three partitions
in total /boot: 1/20 of the total boot partition disk
/swap 1/10 of the total swap partition disk
/ The root partition occupies all the remaining memory
Follow the prompts to continue the installation and finally log in to the system.
2. Connect to the Internet
After logging in, connect to the network
and the service is in progress.
Section 5 Install vmtools (generally not needed)
1 Introduction
After vmtools is installed, it allows us to better manage vm virtual machines under windows.
- You can directly paste commands between windows and centos systems
- Shared folders for windows and centos can be set up
2.vmtools installation and use
Note: Installing vmtools requires a gcc environment
①. Test whether gcc is installed
gcc -v
②. Install gcc
yum -y install gcc
-
Log in to centos
-
Click ->install vmware tools on the vmware menu
-
A vmware tools CD will appear on the centos desktop. Click to open it and you will see a compressed package.
-
Copy the compressed package above to the opt directory and unzip it
-
Enter the directory where the vm is decompressed and execute ./vmware-install.pl
-
Just use the default settings during the installation process (press enter key)
-
A reboot is required to take effect (centos7 will take effect even without restarting)
3. Set up shared folders
- For convenience, you can set up a shared folder, such as d:/myshare
- Specific steps
- Menu->vm->setting, set as shown in the figure. Note: The top setting is always enable, so that it can be read and written.
- Windows and centos can share the d:/myshare directory and can read and write files.
- The shared folder is under /mnt/hgfs/ on centos
- Notes and details
- Windows and centos can share files, but in actual development, file uploading and downloading need to be completed remotely.