Table of Contents
I. Introduction
2. Version information
3. Hadoop user creation
1. Create hadoop user
2. Restart the system after creating the hadoop user
4. Solution
4.1 Change the default login user
4.2 Install VMware Tools
4.3 Verify whether VMware Tools is installed successfully
4.4 KO! ! !
4.4.1 Uninstall the installed Vmware Tools
4.4.2 Installing the components required for VMware Tools
5. Possible problems and solutions
6. Complete victory
7. Summary
1. Foreword
Hello everyone, before getting into the topic, I wish you all a happy Mid-Autumn Festival and National Day. I wish you all a happy family, good luck in your career, and a prosperous motherland, a prosperous country and a strong people! ! !
I wonder where everyone will go to play during this Double Festival?
I am a college student. I won’t tell you which school I went to. Hey, I am a college student who cannot go home because I didn’t get a ticket for the National Day. I wanted to write an article today on a whim to record that I have just learned “Big Data Technology”. The problem I encountered when reading “Principles and Applications” was also a problem that I spent several hours, borrowed countless articles, and lost several hairs before I was able to solve it (it may also be a problem that only the unlucky me will encounter). You can also share the problems you encounter in the comment area, and maybe someone will help solve it. This is the first article in my life. I also hope that after reading this article, if you find it helpful, please like and save it. Life is not easy, wow, do your best, and help this university~ Sorry to bother everyone~ I am not good at words, so I hope you can forgive me.
If the reader has already installed VMware Tools, please go directly to Section 4.4:4.4 KO! ! !
If it has not been installed yet, there is a detailed installation tutorial below. It is recommended to install the VMware Tools that comes with the virtual machine first. If it cannot be used, try to solve it by referring to this article. Of course, readers can jump directly to section 4.4.2 if they find it troublesome: 4.4.2 Install the components required for VMware Tools without performing other steps. This can also achieve the purpose, but it always feels Something is missing. . .
Warning in advance, this article is very long, but it is definitely a prenatal education level teaching (it can be said to be full of pictures and texts)! ! !
I hope it will be helpful and rewarding for everyone after reading it!
2. Version information
Okay, the prelude is over and let’s get back to the subject. Before learning this course (“Big Data Technology Principles and Applications”), the teacher asked us to install Hadoop on a virtual machine. The virtual machine version and Ubuntu version I installed are as follows:
Virtual machine product: VMware? Workstation 17 Pro Virtual machine version: 17.0.0 build-20800274
ISO image file: ubuntukylin-22.04-pro-amd64.iso
Here is the Baidu Netdisk download link I posted, you can download it yourself:
Link: https://pan.baidu.com/s/1YmTdlnbSJLvLrrx92zz6Qg
Extraction code: wkk6
There is no ISO image file in it. It is too big. You need to enable SVIP to upload it to Baidu Netdisk if it exceeds 4G. If you are a student, you will be left empty-handed. . . Forgive me
3. Hadoop user creation
After you have installed the Ubuntu system, you still need to do some necessary work before installing Hadoop:
1. Create hadoop user
For details on the steps to create a hadoop user, please refer to Teacher Lin Ziyu’s Hadoop3.1.3 installation tutorial and stand-alone/pseudo-distributed configuration. I will not go into details here: Hadoop3.1.3 Installation Tutorial_Single-machine/pseudo-distributed configuration_Hadoop3.1.3/Ubuntu18 .04(16.04)_Xiamen University Database Laboratory Blog (xmu.edu.cn)
When creating a hadoop user, you need to enter a new password. Just remember the password you entered. Don’t forget it! ! !
After completing the operation, you can see that you already have two users. The current logged-in user is the kylin user created when installing the Ubuntu system (the user created by each person may be different). There is also a hadoop user we just created.
2. Restart the system after creating the hadoop user
Use the reboot’ command in the terminal to restart the system:
reboot
However, during the restart process, there may be other logged-in users (hadoop) and possible system inhibitors (inhibitors) that prevent the restart operation from being performed immediately.
To solve this problem, you can try the following two methods:
Method 1: Turn off other user logins and suppressors:
1. Log out user “hadoop” or log out of the system.
2. Turn off any possible system suppressors. You can try using the command ‘systemctl inhibit –list’ to view suppressor information and use the corresponding command to turn them off.
After completing the above steps, execute the “reboot” command again to restart the system.
Method 2: Ignore suppressors and other users and force restart:
Use the command ‘systemctl reboot -i’ to ignore the suppressor and other users and force a reboot. Please note that doing so may result in loss of unsaved data, so use with caution.
Choose the method that suits your situation, and be sure to save and close all important applications and documents before restarting.
Since we have just created the hadoop user and logged in, we cannot perform the restart operation immediately (if you are not logged in as the hadoop user, you can directly restart successfully. The steps later in this section can be ignored). Here we use ‘ systemctl reboot -i’ to reboot:
systemctl reboot -i
4. Solution
4.1 Change the default login user
Sorry for taking so long to get to the real text. After all, this is a nanny level and I am still a novice. I hope readers will forgive me.
When we install Hadoop, we need to use the hadoop user. Of course, we have already created it in the previous step. After restarting in the previous step, enter the kylin user, press ctrl + alt + t to open the terminal window, sudo Enter the /etc/lightdm/lightdm.conf file to modify the login options and execute the following command:
sudo vim /etc/lightdm/lightdm.conf
For the installation and use of vim editor in Linux system, please refer to: Installation and use of vim editor in Linux system_Xiamen University Database Laboratory Blog (xmu.edu.cn)
Press i to insert, change autologin-user=kylin (on the reader’s computer, the “kylin” part should be the user who logged in when the reader created the system, mine is kylin) to autologin-user=hadoop. After the modification is completed, press Press the Esc key on the keyboard to exit vim’s editing state, enter the three English letters “:wq” from the keyboard, then press Enter, save the file and exit
Restart after changes are complete.
reboot
4.2 Install VMware Tools
After restarting, you will find that the default login user after the system is turned on is the hadoop user we created.
1. Find and install VMware Tools in the virtual machine item on the virtual machine menu bar.
2. After clicking, double-click Computer. You can see a DVD in the computer. Double-click it to open it.
3. Drag and drop the VMwareTools file to the desktop
4. Select the file, right-click, and extract it here
5. Open the decompressed file, right-click on the blank space and open the terminal
6.Install VMware Tools
Execute the following command in the open terminal to install VMware Tools
sudo ./vmware-install.pl
After starting the installation, when you see yes, enter yes, and press Enter until the installation is successful.
My suggestion is not to press the Enter key all the way. Enter yes wherever you need to enter yes. Although I don’t know what it means, hahaha, but this operation is better than pressing the Enter key all the time. It’s better. I hope you won’t find it troublesome
“Enjoy, –the VMware team” appears, which means the installation is successful!
If you encounter any problems at this step, you can refer to the following articles (solved by personal testing):
Three minor problems in installing VMware Tools_vmware-install.pl command not found_Yueyue’s blog-CSDN bloghttps:/ /blog.csdn.net/qq_40675934/article/details/122021086
4.3 Verify whether VMware Tools is installed successfully
After the installation is complete, you can find that “Install VMware Tools” has changed to “Reinstall VMware Tools”
You can also use the following command to verify whether VMware Tools is installed successfully:
vmware-toolbox-cmd -v
If VMware Tools has been successfully installed, the VMware Tools version number will be displayed.
In addition, readers can also check whether the VMware Tools service is running. Enter the following command in the terminal:
systemctl status vmtoolsd
If it shows that the service is running, it means that VMware Tools has been successfully installed and running.
You can see the following key information:
- Service status:
active (running)
, indicating that the service is running. - Main process ID:
819
, which represents the process ID of the running main service process. - Memory usage:
7.9M
, indicating the amount of memory currently used by the service. - CPU usage:
15.802s
, indicating the CPU time that the service has used since the service started.
(The warning message in the last few lines of output indicates that part of the log file could not be opened due to insufficient permissions. This may be caused by running the systemctl status
command as a non-administrator. If you want to see the complete Log information, please run the command with sudo as administrator, or check the /var/log/syslog
file for more detailed logs)
If the reader wants to exit the view mode of the systemctl status
command, he or she can press the Q key on the keyboard. After pressing the Q key, the command will exit and return to the terminal prompt, and you can continue to enter other commands to operate.
The above are the steps for installing VMware Tools, possible problems and solutions. If you can achieve file sharing and copy-paste after completing the above steps, then everyone will be happy and you can ignore the following steps!
If you haven’t solved it yet, please listen to me slowly~~~
4.4 KO! ! !
After the installation was completed and restarted, we found that we still couldn’t copy and paste between the virtual machine and the physical machine. This gave me a headache at the time and I ate three bowls of rice! So how do we solve this problem? ? ?
4.4.1 Uninstall the installed Vmware Tools
First of all, delete the VMware Tools we installed before (if it is not installed, we can’t uninstall it),
As usual, go to the bin directory in the file you just unzipped on the desktop:
Right-click on an empty space and open a terminal:
Execute the following command to uninstall VMware Tools. I heard and read it correctly, it is “uninstall”.
sudo ./vmware-uninstall-tools.pl
When the words in the red circle above appear, it means the uninstallation is complete!
4.4.2 Components required to install VMware Tools
After uninstalling, execute the following commands step by step (don’t enter the comment, it is here to let readers understand what is done):
sudo su //Enter super user (root) mode apt-get update //Update the list of available software packages apt-get install open-vm-tools open-vm-tools-desktop //Install open-vm-tools and open-vm-tools-desktop software packages vmware-user //Start VMware related services
It’s still the same here. If you need to enter y, enter y and press Enter for the rest.
As shown below, the installation is complete, enter exit to exit root mode.
reboot after exiting root mode. In fact, sharing can be achieved without rebooting. Jiejiejie
5. Possible problems and solutions
Section 4.2 of this article has listed some problems that may be encountered when installing VMware Tools and the corresponding solutions. Next, we will list other problems that may be encountered during the operation. If you have other questions, please feel free to leave them in the comment area. message.
Question 1. If there is a problem that the domain name cannot be resolved temporarily, please check your network connection and make sure you can access these websites. If the problem persists, please try to change the software source. Comment out the default software source in the /etc/apt/sources.list
file, and then add an available domestic software source, for example University of Science and Technology of China, Tsinghua University, Alibaba, etc. After saving the file, run the sudo apt-get update
command again to update the package list. Here I use the Tsinghua software source (the default image source of each system is different, my system defaults to the Alibaba source), and the image warehouses of Tsinghua and Alibaba Ubuntu are attached:
ubuntu | Mirror site usage help | Tsinghua University open source software mirror site | Tsinghua Open Source Mirrorhttps://mirrors.tuna.tsinghua. edu.cn/help/ubuntu/
ubuntu mirror_ubuntu download address_ubuntu installation tutorial-Alibaba open source mirror station (aliyun.com)https://developer.aliyun .com/mirror/ubuntu
sudo vim /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Problem 2. The problem of “Failed to download software warehouse information. Check your network connection” can also be solved by changing the source above. If it cannot be solved, please refer to the following article:
Ubuntu18 solves “Failed to download software repository information. Check your network connection”-CSDN Bloghttps://blog.csdn.net/nanhuaibeian /article/details/86330330
Six. Complete victory
After going through the above steps, trying to drag and drop files between the virtual machine and the physical machine can be achieved, and the clipboard sharing between the virtual machine and the physical machine can be realized at the same time (that is, you can copy and paste between the two). The problem Perfect solution! ! !
Seven. Summary
I have been busy for a while to finish this article. I hope that when you read the article (especially the article that requires hands-on operation), you will understand what the input commands mean and practice them. In this way Only then can you deepen your impression and reach a higher level!
This first article inevitably has some shortcomings, and I hope readers will give me some advice. We also welcome experts from all walks of life to give guidance and discuss in the comment area.
I wish you all success in your studies and career!
thank you all! ! !