Chapter 2 Linux System Installation

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.

Insert image description here

  1. Install vm software
  2. Create a virtual machine space through vm software
  3. Use vm software to install our Centos operating system on the created virtual space
  4. Using Centos

Section 2 vmware download and installation and centos download

1.vmware software

①Download

vmWare download address

②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.
      Insert image description here
  • 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.

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)
Insert image description here
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

Insert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
How to check the total number of cores of a physical machine:
Open Resource Monitor->CPU in Task Manager->Open the page
Insert image description here
Insert image description here

1. Three modes of network connection during virtual machine installation

Insert image description here
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.
Insert image description hereInsert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

Section 4 Installing CentOS system

Password generation address

Password generation tool address: https://suijimimashengcheng.bmcx.com/

1. centos system installation

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
It is recommended to turn off kdump in the learning environment
Insert image description here

Insert image description here
Insert image description here
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
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

Insert image description here
Insert image description here
Insert image description here
/The root partition file system is ext4
Insert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
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.
Insert image description here

Insert image description here

Section 5 Install vmtools (generally not needed)

1 Introduction

After vmtools is installed, it allows us to better manage vm virtual machines under windows.

  1. You can directly paste commands between windows and centos systems
  2. 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
  1. Log in to centos

  2. Click ->install vmware tools on the vmware menu
    Insert image description here

  3. A vmware tools CD will appear on the centos desktop. Click to open it and you will see a compressed package.
    Insert image description here
    Insert image description here

  4. Copy the compressed package above to the opt directory and unzip it
    Insert image description here

  5. Enter the directory where the vm is decompressed and execute ./vmware-install.pl
    Insert image description here

  6. Just use the default settings during the installation process (press enter key)

  7. A reboot is required to take effect (centos7 will take effect even without restarting)

3. Set up shared folders

  1. For convenience, you can set up a shared folder, such as d:/myshare
  • Specific steps
  1. Menu->vm->setting, set as shown in the figure. Note: The top setting is always enable, so that it can be read and written.
  2. Windows and centos can share the d:/myshare directory and can read and write files.
  3. The shared folder is under /mnt/hgfs/ on centos
    Insert image description here
  • Notes and details
  1. Windows and centos can share files, but in actual development, file uploading and downloading need to be completed remotely.

Guess you like

Origin blog.csdn.net/wyr1235/article/details/128862333