Linux [Introduction] - Overview, virtual machine creation, environment configuration, installation and use of vmtools, use of shared folders

content

1. Overview of Linux

2. Setting up the Linux environment

1. Software download (with download address)

2. Environment Construction

3. Supplement: Three modes of network connection

3. Virtual machine related operations

1. Virtual machine clone

2. Virtual Machine Snapshot

3. Virtual machine migration and deletion

Fourth, install vmware tools

5. How to set up shared folders


1. Overview of Linux

        The full name of Linux is GNU/Linux, which is a free and open source UNIX-like operating system . It can run major Unix utilities, applications and network protocols, and supports 32-bit and 64-bit hardware. Linux inherits the network-centric design idea of ​​Unix, and is a multi-user network operating system with stable performance.

        The main Linux distributions are Ubuntu (Ubuntu), RedHat (Red Hat), CentOS , Debain (Butterfly), Fedora, SuSE, OpenSUSE (schematic diagram), no matter what version is used, the kernel is Linux, so in different versions The related instructions are actually the same. The three main application areas of Linux are:

  • Personal desktop field: Linux's weak point, which is still under continuous improvement;
  • Server field : Linux is the strongest in the server field, characterized by free, stable and efficient;
  • Embedded field: IoT-related set-top boxes, digital TVs, Internet phones, mobile phones, etc. are all its application fields.

2. Setting up the Linux environment

        Using Linux requires an environment, you can install a virtual machine first, and then install the CentOS system on the virtual machine; of course, you can also directly install the CentOS system on the real machine for Linux operations.

1. Software download (with download address)

        The virtual machine software I use here is VMware 12.0.0, and the image file is CentOS 7.6. The link is as follows:

VMware link: https://pan.baidu.com/s/1RNVL4nDmLMO6FnPHpTZKQw 
Extraction code: 0214

CentOS 7.6 link: https://pan.baidu.com/s/1RFH9TSxKbTWqzOaD2O8Zvw 
Extraction code: 0214 

2. Environment Construction

After VMware is successfully installed, the interface is as follows;

The first step is to create a virtual machine, click "Create a new virtual machine" --> "Typical" --> "Next";

"Install the operating system later" --> "Next";

The guest operating system selects Linux, and the version selects Red Hat 7 64-bit (CentOS itself is a branch of Red Hat);

Next, create a virtual machine name and specify the path;

Specify the disk capacity;

Custom hardware, you need to pay attention to the settings of the network adapter here, we choose NAT mode, and the rest can be defaulted;

After the network adapter settings are completed, close the page and click Finish;

At this point, the virtual machine has been created and the space has been allocated;

Next, select the disc image file;

After the relevant settings are completed, start the virtual machine, select Install CentOS 7, and press Enter to start the installation;

After the installation, it will guide us to select the language. It should be noted that the following interface will appear after selecting the language;

The software selection defaults to the minimum installation, which saves space and runs faster, but has no interface. In order to facilitate intuitive operation, we choose "GNOME Interface" --> "Finish";

Installation location, you can use automatic partitioning, or you can partition it according to your needs;

Network and hostname, open network connection;

Click to start installation;

Set Root password and create user;

Start the installation, there are two users in the operating system at this time, one is the highest root privilege, and the other is the user we created;

After the installation is successful, restart, select the user to log in;

When you see the following interface, the configuration of the Linux environment is completed, and the network connection is normal through the Firefox test.

3. Supplement: Three modes of network connection

  • Bridge mode ; if the Linux virtual system wants to communicate with the external system, the network segment of the virtual system must be consistent with the external system. For example, the IP address of the external system is 192.168.0.20, then the network segment of Linux must be 192.168.0.XX, which is called bridging, and this mode is easy to cause IP conflicts.
  • NAT mode ; network address translation mode, the network segment does not need a consistent Linux virtual system to communicate with external systems. For example, if there is an IP address in a virtual system, an IP address with the same prefix as the virtual system IP will be automatically generated in its host. The two form a network and will not cause IP conflicts.
  • Host mode ; a stand-alone system with no connection to the outside world.

3. Virtual machine related operations

1. Virtual machine clone

        If you have installed a Linux operating system, but want other virtual systems to interoperate with each other, you don't need to reinstall at this time, just clone the installed virtual machine. To clone a virtual machine, you can use VMware's clone operation, but it should be noted that the Linux operating system that is currently running must be closed when cloning, otherwise it cannot be cloned.

As shown in the following clone demonstration, after shutting down the Linux operating system, select the virtual machine --> right-click --> Manage --> Clone;

After that, the clone wizard appears, and you can proceed to the next step. The clone is successful as follows;

Even if the cloned operating system is copied to other people's computers, it is completely consistent and can be used normally.

2. Virtual Machine Snapshot

        In the process of using the virtual operating system, if you accidentally make a misoperation and want to return to a previous state, you can use the snapshot management function of VMware, which is actually a switch between states. Snapshot settings are also very simple, select the virtual machine --> right-click --> Snapshot --> take a snapshot;

Next, we make a case to demonstrate the switching of snapshots: 

        The virtual machine just started, without any operation, we define it as snapshot 1;

        Then create a folder on the desktop and define the state as snapshot 2 at this time;

        Looking at the snapshot manager at this point, we can clearly see the operation record;

        At this point, we go to snapshot 1 from the current location, select snapshot 1, and click "Go";

3. Virtual machine migration and deletion

        After the virtual machine is successfully installed, it is placed in a folder, then the migration can be directly Ctrl + X to cut and paste; to delete, remove it in VMware and then delete the file.

Fourth, install vmtools

        VMware Tools is an enhancement tool that comes with VMware virtual machines. It is a driver provided by VMware to enhance the performance of virtual graphics cards and hard disks, as well as synchronize virtual machine and host clocks. It allows us to better manage virtual machines under Windows, such as setting up Windows and CentOS shared folders and so on.

installation steps:

  1. Enter the virtual machine interface and pop up CentOS 7;
  2. Select the virtual machine, right-click --> install VMware tools;
  3. The vm installation package xx.tar.gz appears;
  4. Copy the installation package to the /opt file in the main folder;
  5. Open the terminal and use the command cd /opt to enter the opt directory;
  6. Use the command tar -zxvf VMwareTools-10.0.0-2977863.tar.gz to decompress the installation package file;
  7. After the decompression is successful, the decompression directory will appear;
  8. Enter the decompression directory;
  9. There are installation files in this directory;
  10. ./vmware-install.pl to install;
  11. All options can be entered by default, and the VMware tools installation is successful as follows.

5. How to set up shared folders

        After successfully installing vmware tools, you can share folders between windows and CentOS; we first create a folder Linux_share in Windows at will;

Then set up sharing in VMware: select the virtual machine --> right-click --> Settings --> Options --> Shared Folders, select Always Enabled, and then add the folder we created in Windows;

At this point, the folder Linux_share can be shared between Windows and CentOS.

We can see the file in the main At this time, whether we operate in Windows or CentOS, the file is synchronized in real time.

Guess you like

Origin blog.csdn.net/weixin_53072519/article/details/123257480