About the JDK environment, Hadoop environment configuration and Scala installation of the Linux subsystem Ubuntu under Windows10

Issues in the JDK environment, Hadoop environment configuration, and Scala installation of the Linux subsystem Ubuntu under Windows 10

Installation prerequisite:
Platform: Windows10 computer, pre-downloaded Ubuntu subsystem, if you won’t download, see tutorial:
Windows10 uses Linux subsystem
Here I use Ubuntu 18.04.

We want to start learning about big data. The teacher asked us to install the Scala software under the Linux system and configure the JDK environment and Hadoop environment it needs. Here I mainly refer to the installation tutorial of Teacher Lin Ziyu. I have to say that Mrs. Lin's installation tutorial is great! Thanks Teacher Lin!

Attach the installation link of teacher Lin Ziyu: Getting started with spark2.1.0 : Spark installation and using
Hadoop installation tutorial
Note: In the linked installation tutorial, the teacher has given him the Baidu network disk resources provided by him, including all the installation required for this tutorial You don’t have to bother to find the files, thank you Lin Ziyu again (so touched)!

The advantages of choosing the Linux subsystem under Windows: it is not as cumbersome as the configuration of the virtual machine + Ubuntu image file, and the learning of Scala is still enough;

But according to my roommate who downloaded VirtualBox and installed the Ubuntu system, I did not have much problem installing both according to teacher Lin Ziyu's tutorial. Students who want to install VirtualBox can also try.

The steps in the tutorial are very complete. Below I will mainly talk about the problems that occurred during the installation process:

  1. Regarding the login after the creation of the hadoop user.
    Since Ubuntu under Windows does not have a login interface, you can choose to enter the following command in the command line:
    su -l hadoop
    Then you will be prompted to enter the password, and you can log in to the hadoop user by entering the password
  2. Install ssh (the highlight is here)
    The Ubuntu system under Windows has actually installed the openssh-server in the teacher's tutorial by default, so after you execute the sudo apt-get install openssh-servercommand, it will show a description, which roughly means that you have already installed it; You enter it ssh localhostand find the following problem:
    Insert picture description here## Solution 1:
    Don’t worry, it may be that your ssh service is not turned on. Try to enter the command to sudo service ssh startturn on the ssh service. If it goes well, the following prompt may appear:
    Insert picture description hereEnter the ssh localhostcommand again , The following interface will appear:
    Insert picture description here## Solution 2: First uninstall the openssh-server installed by itself, then follow the tutorial and then download an openssh-server again, and then follow the tutorial;

Here I have a question: I did not see the ssh first login prompt when I installed it, but I have never logged in to ssh before. And when I log in with the hadoop user for the first time, there is no need to enter the password, which is a bit strange...

  1. When installing the Java environment, I don’t know how to decompress the jdk downloaded under Windows to Ubuntu: (Here I choose the manual installation method)
    Solution: It’s actually very simple. Enter the command cd /mnt(there is a space between cd and /mnt) ) can enter the directory under Windows, and then commands the teacher given to the jdk extract to / usr / lib directory in Ubuntu
    with archive decompression process spark to give an example :( because I have installed the jdk I can’t find the screenshot...)
    Insert picture description hereBefore decompression, we first enter the directory where you store the jdk file, mine is on the D drive, so I enter /mnt/d and follow the command given by the teacher:sudo tar -zxf 要解压的文件的名字 -C 解压后放入的目录路径
  2. Note: I did not configure ssh to log in automatically, so every time before entering hadoop users log in to ssh, we need to turn on the ssh service before logging in. If you feel troublesome, you can refer to the Insert picture description herescreenshot from the blog Windows10Linux subsystem configuration ssh

Next, follow the tutorial, and there is no problem with my spark installation, and the screenshot of the operation after the spark installation is successful
Insert picture description here

My roommate said, the spark logo looks so cool and advanced!
Hehehe, I think so too.

This environment installation that took a lot of time is finally installed, happy! Ubuntu under Windows is still practical at this stage of my life (I can't feel it if it is not practical).
If you have any questions, please raise them in the comments, maybe we can discuss them together.
Finally, I echoed from the beginning and the end, and thank you Lin Ziyu again! We love you!

Guess you like

Origin blog.csdn.net/xiongdan626/article/details/108747068