[Linux Part 1] VMWare virtual machine installation, environment configuration and remote connection – windows version

Table of Contents

1. Operating system

1.1 What is an operating system

1.2 Common operating systems

1.3 The difference between personal version and server version

1.4 Various versions of Linux

2. VMWare virtual machine installation and configuration process

2.1 Installation

2.2 Configure virtual network editor

3. Install and configure Windows Server 2012 R2

3.1 Create a virtual machine

3.2 Install the image of Windows Server 2012

4. Virtual machine environment configuration and remote connection

4.1 Host connects to virtual machine

4.2 Virtual machine file sharing

4.3 Virtual machine JDK configuration and MySQL installation

4.4 The host connects to the virtual machine database


1. Operating system

1.1 What is an operating system

Operating System (OS for short): It is a system software that is the bridge between computer hardware and application software. It manages the computer’s hardware and software resources, provides interfaces and services to applications, and coordinates the running of applications. The operating system is one of the most basic software in a computer system. It controls all computer activities, including input and output, processing data, managing storage, coordinating processes and network communications. Common operating systems include Windows, macOS, Linux, Unix, etc.

1.2 Common Operating Systems

  • windows operating system

The Microsoft Windows series operating systems are graphical operating systems designed based on MS-DOS designed by Microsoft for IBM machines. From the earliest DOS version, win 95, win 97, win 98, win 2000, win 2003 (server operating system), win xp, win vista, win 7, win serve 2008 (server operating system), win 8, win server 2012 (server operating system), win 10, win server 2016 (server operating system), win 11.

  • UNIX operating system

UNIX is basically installed on the server. It has no user interface and is basically a command operation. So when you enter the system, there is a dark interface, and then a cursor flashes. There is no entertainment software, I can’t view pictures or listen to music.

  • linux operating system

lLinux is considered the successor of Unix. Linux inherits many features of Unix and adds some new functions. Linux follows the open source route. It is free and anyone can make modifications and then develop their own operating system. For example, the well-known ones include debian, Ubuntu, centos, and Hongqi. Similarly, Linux is mainly used on servers and is rarely used by ordinary users.

  • mac operating system

macos is an operating system that runs on Apple’s Macintosh series of computers, and is basically familiar to Apple users. macos has a good user experience and gorgeous user interface. In fact, what few people know is that macos is a product of the Unix system family.

  • Embedded operating system

Embedded systems use a very wide range of systems (such as VxWorks, eCos, Symbian OS and Palm OS) as well as some reduced-function versions of Linux or other operating systems. In some cases, OS refers to a huge general-purpose program with built-in fixed application software. In many of the simplest embedded systems, the so-called OS refers to the only application program on it.

1.3 The difference between the personal version and the server version

  • Client operating systems are operating systems that run on desktop computers and other portable devices. In contrast, a server operating system is an operating system developed for installation and use on servers.

  • The client operating system can obtain services from the server. In contrast, a server operating system can serve many client or end-user devices.

  • A user can only use one client operating system at a time. In contrast, a server operating system can serve multiple client devices simultaneously.

  • Client operating systems can run on client devices, including tablets, desktops, mobile phones, and laptops. Instead, a server operating system can run on the server.

  • Server operating systems are more advanced and have more features than client operating systems.

  • Client operating systems are less secure than server operating systems. In comparison, server operating systems are more secure than client operating systems.

  • Some examples of client operating systems are Windows, Android, Mac, etc. In comparison, some examples of server operating systems are Mac OS X, Windows Server, Red Hat Enterprise Linux, etc.

Various versions of 1.4 Linux

  • Debian

The origin of Debian’s name DebianGNU/Linux was launched in 1993 by a man named Ian Murdock. His name starts with Ian, and his wife’s name Debra starts with Deb.

Debian is a model of community-based Linux and is the Linux system that most closely follows GNU specifications so far. Debian was first created by Ian Murdock in 1993 and is divided into three version branches:

stable (server version), testing (stable version) and unstable (beta version).

  • Ubuntu

Strictly speaking, Ubuntu cannot be considered an independent distribution. Ubuntu is based on the unstable version of Debian and is enhanced. It can be said that Ubuntu is a nearly perfect Linux desktop system that has all the advantages of Debian and its own enhanced advantages. There are three versions:

Ubuntu based on Gnome, Kubuntu based on KDE. Xubuntu based on Xfc.

  • Redhat

In March 1994, Linux version 1.0 was officially released. Marc Ewing established RedHat Software Company and became one of the most famous Linux distributors. After http://redhat.com released redhat9 (abbreviated as rh9), it turned to the development of redhat enterprise linux (abbreviated as rhel). The difference from the past is that the new rhel 3 requires users to purchase first and promise to ensure the stability of the product. safety.

  • Fedora

Fedora and Redhat are two Linux distributions that are closely related. Since Redhat 9.0, it has no longer released a desktop version. Instead, it has cooperated with the open source community on this project, so Fedora, a Linux distribution, was born. The Fedora project is sponsored by Red Hat and is a collective name for projects developed by the open source community and Red Hat engineers. Fedora’s goal is to promote faster progress in free and open source software.

Features:

1. Fedora is an open, innovative, forward-looking operating system and platform based on Linux. It allows anyone to freely use, modify and redistribute it, now or in the future. Runnable architectures include x86 (i386), x86_64 and PowerPC!

2. Fedora can be said to be the continuation of the Redhat desktop version, but it only cooperates with the open source community.

3. Fedora is an independent Linux distribution operating system.

  • centos

http://redhat.com After releasing redhat 9, it stopped developing redhat and turned to the development of redhat enterprise linux (abbreviated as rhel). The difference from the past is that the new rhel 3 requires users to purchase lisence first, http:// redhat.com promises to ensure product stability and security. The rhel 3 binary code is no longer available for download, but as part of the redhat service, but the source code is still open.

Features:

1. The CentOS (Community Enterprise Operating System) program is one of the “Red Hat rebuilders” that emerged after Red Hat decided in 2003 to no longer provide free technical support and product certification.

2. CentOS has fixed the redhat bug that has been discovered.

2. VMWare virtual machine installation and configuration process

2.1 Installation

VMware Workstation Pro official website: Download VMware Workstation Pro

Before starting the installation, you need to prepare sufficient space and save the files in a non-Chinese directory.

You can choose to install VMware WorkStation 15 Pro or VMware WorkStation 16 Pro according to the actual situation of the computer. The example in this chapter uses 16Pro.

1. Fool-like installation, always select the next step. There are previous installation location and product update prompts that you can modify by yourself.

2. Finally click on the license and enter the activation key:

Win + r to open the task manager –> Enter network connection in the search bar –> As shown in the figure below, these two network devices appear and the installation is successful.

2.2 Configure Virtual Network Editor

Open VMware Workstation Pro Virtual Machine Workstation –> Click Edit –> Virtual Network Editor –>Select VMnet8, and then click Change Settings

Then it will pop up this interface again –> Select VMnet8 –>DHCP settings –> Modify the default lease time –> Finalize OK.

3. Installation and configuration Windows Server 2012 R2

There is no direct configuration of Linux here. Before that, we first used a Windows virtual machine to pave the way for better learning of Linux.

3.1 Create a virtual machine

1. Create a new virtual machine

Next, select the operation as shown:

Create a virtual machine name and installation location,

Finally, keep going to the next step until this interface appears, click Finish.

3.2 Install the image of Windows Server 2012

After configuration, click CD/DVD (SATA) on the device on the left, select CD/DVD (SATA), select Use ISO image in the connection, and select to set the image file of Windows Server 2012 Local storage directory.

Windows Server 2012 R2 Simplified Chinese version 64-bit (Thunder download)

ed2k://|file|cn_windows_server_2012_r2_x64_dvd_2707961.iso|4413020160|010CD94AD1F2951567646C99580DD595|/

Installation process:

1. Start the virtual machine

2. Activate windows

After turning on the virtual machine, the window interface will appear. Click Next to enter the activation windows interface. The activation code does not need to be copied and pasted. It must be entered manually.

3. Select a server with GUI

4. Install windows and other operations

5. Settings

After the installation is complete, you need to set a user password, which must be very secure (it must contain uppercase and lowercase characters and numbers).

6. Login

According to the screen display Ctrl + Alt + Delete, log in.

This will cause the computer to start a shortcut, just cancel it.

Interface after successful login:

4. Virtual machine environment configuration and remote connection

4.1 Host connection to virtual machine

In the virtual machine, WIN + R, enter ipconfig, view the IP of the local machine and remember it for later use

1. Open the control panel –> system security –> windows firewall — turn off the firewall! ! !

2. Open Control Panel –> System Security –> Allow remote access

3. In the host, find the remote connection desktop and enter the IP of the virtual machine, as shown in the figure:

4. Enter the username and password for the connected virtual machine.

If you encounter authentication failure, please read the article: Troubleshooting Remote Desktop Connection “This may be due to CreddSSP encryption database fix” problem

4.2 Virtual Machine File Sharing

1. Create two folders on the local disk of the virtual machine. As shown in the picture:

2. Select the folder to share it

3. In the host, WIN + R, Enter \ + plus the IP address of the virtual machine, click Confirm, and then you will need to enter credentials (virtual machine login account and password). Files can be shared.

4. In the host, just copy the files that need to be transferred to the virtual machine directly to the files shared by the virtual machine to the host. After the files are transferred to the host, they can be directly viewed in the virtual machine.

Virtual machine:

4.3 Virtual machine JDK configuration and MySQL installation

The same is true for the configuration of virtual machines. Let us review it, shall we?

  • JDK installation and configuration

1. Double-click the file for fool-proof installation

2. Configure system environment variables

3. Create new environment variables

  • Variable name: JAVA_HOME
  • Variable value: C:\Program Files\Java\jdk1.8.0_144 (jdk installation and download directory)

4. Add variables to path

  • %JAVA_HOME%\bin;
  • %JAVA_HOME%\jre\bin

  • MySQL installation

1. First decompress the musql installation package and create the my.ini file in the root path of the decompressed file.

[mysql]
#Set the default character set of mysql client
default-character-set=utf8

[mysqld]
#Set port 3306
port=3306
# Set the installation directory of mysql (the path after decompression)
basedir=C:\software\mysql-8.0.18-winx64
#Set the storage directory for the data of the mysql database
datadir=C:\software\mysql-8.0.18-winx64\data
#Maximum number of connections allowed
max_connections=200
# The character set used by the server defaults to the 8-bit encoded latin1 character set
character-set-server=utf8
# The default storage engine that will be used when creating new tables
default-storage-engine=INNODB

2. In the bin directory where mysql is installed, enter cmd to open the command window and enter the following commands respectively.

  • Installation: mysqld -install
  • Initialization: mysqld –initialize –console
  • Start: net start mysql
  • Log in to mysql: mysql -P 3306 -u root -p
  • Change password: ALTER USER root’@localhost’ IDENTIFIED WITH mysql_native_password BY 123456’;

4.4 The host connects to the virtual machine database

Continue to enter mysql in the bin command of mysql and execute the following sql

Use : use mysql

Modify authorization: update user set host=’%’ where user=’ root ‘

Finally restart the virtual machine mysql server

Open host navicat and create a new connection: enter the virtual machine IP address and some related information:

connection succeeded: