Deploy a virtual environment to install a Linux system (Linux should learn this way) Notes

Author: Chenhao
1. Installation Configuration VM virtual machine
VMware WorkStation virtual machine software is a desktop computer virtualization software, allowing users to run multiple different operating systems simultaneously on a single host. The hard disk partition and data configuration of each virtual operating system are independent, and multiple virtual machines can be constructed as a local area network. The Linux system has very low requirements for hardware equipment. We do not need to buy another computer. The virtual machine for the course experiment can be done. Moreover, the VM also supports real-time snapshots, virtual networks, drag files, and PXE (Preboot Execute Environment) Environment) Convenient and practical functions such as network installation.
Step 1: Run the downloaded Vmware Workstation virtual machine software package
Insert picture description here

Step 2: Click the "Next" button on the virtual machine software installation wizard interface
Insert picture description here

Step 3: In the end user license agreement interface, select the "I accept the terms in the license agreement" check box, and then click the "Next" button
Insert picture description here

Step 4: Select the installation location of the virtual machine software (you can choose the default location), select the "enhanced keyboard driver" check box and click the "Next" button
Insert picture description here

Step 5: Select the "Check for product updates at startup" and "Help improve VMware Workstation Pro" check boxes according to your own situation, and then click the "Next" button
Insert picture description here

Step 6: Check the "Desktop" and "Start Menu Program Folder" check boxes, and then click the "Next" button
Insert picture description here

Step 7: When everything is ready, click the "Install" button
Insert picture description here

Step 8: Enter the installation process, all you have to do at this time is to wait patiently for the end of the virtual machine software installation process
Insert picture description here

Step 9: After about 5-10 minutes, the virtual machine software will be installed, and then click the "Finish" button again
Insert picture description here

Step 10: Double-click the virtual machine shortcut icon generated on the desktop. In the pop-up interface as shown in Figure 1-10, enter the license key, or select the trial, and click the "Continue" button (here is "I want to try VMware Worksatation 12 for 30 days" checkbox).
Insert picture description here

Step 11: After the "Welcome to VMware Workstation 12" interface appears, click the "Finish" button
Insert picture description here

Step 12: Double-click the shortcut on the desktop again, and you will see the management interface of the virtual machine software.
Note that after installing the virtual machine, the Linux system cannot be installed immediately, because the operating system hardware must be set in the virtual machine standard. Only after simulating the hardware resources of the system in the virtual machine can you formally enter the journey of Linux system installation. The power of the VM virtual machine is that it can not only call up real physical device resources, but also simulate resources such as multiple network cards or hard disks, so it can fully meet everyone's needs for the learning environment.
Insert picture description here
2. Create a virtual machine
. Step 1: Click "Create a new virtual machine" option, and select the "typical" radio button in the pop-up "New Virtual Machine Wizard" interface, and then click the "Next" button
Insert picture description here

Step 2: Check the "Install the operating system later" radio button, and then click the "Next" button
Insert picture description here

Step 3: In Figure 1-15, select the type of guest operating system as "Linux" and the version as "Red Hat Enterprise Linux 7 64-bit", and then click the "Next" button.
Insert picture description here

Step 4: Fill in the "Virtual Machine Name" field, and click the "Next" button after selecting the installation location
Insert picture description here

Step 5: Set the "Maximum Disk Size" of the virtual machine system to 20.0GB (the default is fine), and then click the "Next" button
Insert picture description here

Step 6: Click the "Customize Hardware" button
Insert picture description here

Step 7: In the interface shown in Figure 1-19 that appears, it is recommended to set the available amount of virtual machine system memory to 2GB, and the minimum should not be less than 1GB. If your real machine has strong performance, it is also recommended to set the amount of memory to 2GB, because it is not necessary to set the memory of the virtual machine system too large.
Insert picture description here

Step 8: Set the number of CPU processors and the number of cores of each processor according to the performance of your real machine, and enable the virtualization function
Insert picture description here

Step 9: The CD-ROM device should select the downloaded RHEL system image file in "Use ISO image file"
Insert picture description here

Step 10: The VM virtual machine software provides users with 3 optional network modes, namely bridge mode, NAT mode and host-only mode. Here select the "host only mode"
bridging mode: it is equivalent to building a bridge between the physical host and the virtual machine network card, so that the external network can be accessed through the physical host network card.

NAT mode: Let the network service of the VM virtual machine play the role of a router, so that the host simulated by the virtual machine software can access the external network through the physical host. In the real machine, the physical network card corresponding to the NAT virtual machine network card is VMnet8.

Host-only mode: Only the host in the virtual machine can communicate with the physical host and cannot access the external network. In the real machine, only the physical network card corresponding to the host mode analog network card is VMnet1.
Insert picture description here

Step 11: Remove all unnecessary devices such as USB controllers, sound cards, and printer devices. After removing the sound card, you can avoid prompting sounds after input errors, and ensure that your thoughts will not be disturbed in future experiments. Then click the "Close" button
Insert picture description here

Step 12: After returning to the virtual machine configuration wizard interface, click the "Finish" button. The installation and configuration of the virtual machine was successfully completed.

Insert picture description here

Step 13: When you see the interface shown in Figure 1-25, it means that your virtual machine has been configured successfully
Insert picture description here

3 Install your Linux system
Step 1: In the virtual machine management interface, click the "Turn on this virtual machine" button and you will see the RHEL 7 system installation interface in a few seconds, as shown in Figure 1-26. In the interface, the functions of Test this media & install Red Hat Enterprise Linux 7.0 and Troubleshooting are to verify the integrity of the CD before installing and start the rescue mode respectively. At this time, use the arrow keys of the keyboard to select the Install Red Hat Enterprise Linux 7.0 option to directly install the Linux system.
Insert picture description here

Step 2: Next, press the Enter key and start to load the installation image. The time required is about 30-60 seconds, please be patient
Insert picture description here

Step 3: Select the installation language of the system and click the Continue button
Insert picture description here

Step 4: Click the SOFTWARE SELECTION option in the installation interface
Insert picture description here

Step 5: The software customization interface of the RHEL 7 system can adjust the basic environment of the system according to the needs of users, such as using the Linux system as a basic server, file server, Web server or workstation, etc. At this point, you only need to click to select the Server with GUI radio button in the interface, and then click the Done button in the upper left corner.
Insert picture description here

Step 6: Return to the main interface of RHEL 7 system installation, click the NETWORK & HOSTNAME option, set the Hostname field to linuxprobe.com, and then click the Done button in the upper left corner
Insert picture description here

Step 7: Return to the main installation interface, click the INSTALLATION DESTINATION option to select the installation medium and set the partition. No modification is required at this time, just click the Done button in the upper left corner
Insert picture description here

Step 8: Return to the main installation interface, click the Begin Installation button to see the installation progress, select ROOT PASSWORD here
Insert picture description here

Step 9: Then set the password of the root administrator. If you insist on using a weak password, you need to click the Done button in the upper left corner twice to confirm, as shown in Figure 1-34. I need to say one more thing here. When you experiment in a virtual machine, the password does not matter whether it is strong or weak, but in a production environment, the password of the root administrator must be sufficiently complex, otherwise the system will face serious security problems.
Insert picture description here

Step 10: The Linux system installation process usually takes 30 to 60 minutes. Just wait patiently during the installation process. Click the Reboot button after installation is complete
Insert picture description here

Step 11: After restarting the system, you will see the initialization interface of the system, click the LICENSE INFORMATION option
Insert picture description here

Step 12: Check the I accept the license agreement check box, and then click the Done button in the upper left corner
Insert picture description here

Step 13: After returning to the initialization interface, click the FINISH CONFIGURATION option to see the setting interface of the Kdump service. If you do not plan to debug the system kernel for the time being, you can also uncheck the Enable kdump check box, and then click the Forward button
Insert picture description here

Step 14: In the system subscription interface shown in Figure 1-39, select the No, I prefer to register at a later time radio button, and then click the Finish button. Setting here to not register the system has no effect on subsequent experimental operations and production work.
Insert picture description here

Step 15: After restarting the RHEL 7 system in the virtual machine software again, we can finally see the welcome interface of the system, as shown in Figure 1-40. Select the default language English (United States) in the interface, and then click the Next button.
Insert picture description here

Step 16: Select English (US) as the input source type of the system, and then click the Next button
Insert picture description here

Step 17: Create a local ordinary user for the RHEL 7 system, the user name of this account is linuxprobe, the password is redhat, and then click the Next button
Insert picture description here

Step 18: Set the time zone of the system according to the settings shown in Figure 1-43, and then click the Next button.
Insert picture description here

Step 19: Click the Start using Red Hat Enterprise Linux Server button in the interface shown in Figure 1-44, and the interface shown in Figure 1-45 will appear. So far, the RHEL 7 system has completed all the installation and deployment work. Ready to start learning Linux system.
Insert picture description here
1.4 Reset the password of the root user
There are many things that cause headaches for operation and maintenance personnel on weekdays, so don't panic if you occasionally forget the password of the Linux system. You can reset the password in a few simple steps. However, if you are reading this book for the first time, or if you have no experience in using Linux systems before, please skip this section first, and then come back to this section after you finish learning the commands of the Linux system. If you have just taken over a Linux system, you must first determine whether it is a RHEL 7 system. If yes, then proceed to the following operations.
[root@linuxprobe ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)

Step 1: Restart the Linux system host and when the boot interface appears, press the e key on the keyboard to enter the kernel editing interface
Insert picture description here
. Step 2: Add the "rd.break" parameter to the end of the linux16 parameter line, and then press Ctrl + X key combination to run the modified kernel program
Insert picture description here
Step 3: After about 30 seconds, enter the emergency mode of the system.
Insert picture description here
Step 4: Enter the following commands in sequence, wait for the system to restart, and then use the new password linuxprobe to log in to Linux System.

mount -o remount,rw /sysroot
chroot /sysroot
passwd
touch /.autorelabel
exit
reboot

Insert picture description here

Guess you like

Origin blog.csdn.net/m0_52425873/article/details/112632812