Mac OS configures the Hadoop operating environment on a Linux virtual machine, a super detailed tutorial, with pictures for every step! 【1. Virtual environment preparation】

Mac OS builds the Hadoop operating environment:

Create a Linux virtual machine:

1. Use VMware fusion to create a centos virtual machine. The installation package used is placed in the link below, and you can download it yourself if necessary; Baidu network disk address: [centos_7_aarch64 mirror file](https://pan.baidu.com/s/1UJbuWZIm2SOoaLaD0hsWUg ?pwd=jk12)

Extract the password: jk12
first select the custom virtual machine;
insert image description here
define the name of the virtual machine in VMware:
Define the name of the virtual machine in VMware
after the creation is complete, this interface will pop up (if it does not pop up, you can find it in the settings), select CD/DVD to add the Centos image file ;
insert image description here
Here must click the option of connecting CD/DVD drive , and select the location of the Linux image file you want to use below;
insert image description here
insert image description here
modify the size of the hard disk to 20G
insert image description here
After completing the above settings, click on the virtual machine to install:
Choose Chinese language
here is to set the disk allocation , the automatic partition I choose here, if you want to set it yourself, you can also choose to customize; you can choose the
insert image description here
installation type in the software selection, the default is the minimized system (command line interface), here I choose the system with a desktop, which is convenient for later Operation (and I'm pretty hhhh);
insert image description here
set the time zone:
insert image description here
open the network settings: click the open button, and modify the host name to hadoop100
insert image description here
insert image description here
and click to start the installation. After the installation is complete, restart the system.
At this point, the virtual machine installation is complete.

Configure virtual machine hadoop100

Enter the virtual machine and use the root user to modify the ifcfg-ens160 file:
vim /etc/sysconfig/network-script/ifcfg-ens160

//将BOOTPROTO设置为static
//在文件最下面添上自己的IP地址,网关和域名解析器:
IPADDR=自己的IP地址
GATEWAY=自己的网关
DNS1=自己的域名解析器

If the host name has not been modified just now, modify it in the hostname file:

vim /etc/hostname
//主机名称应该为hadoop100

Set up IP mapping:

vim /etc/hosts
应该为:自己的IP地址 hadoop100

Turn off the firewall: execute the following two lines of code

systemctl stop firewalld
systemctl disable firewalld.service

Make the user you created have root privileges:

vim /etc/sudoers
找到如下:
## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL  
在这个后面添加:
你创建的用户名名字   ALL=(ALL)     NOPASSWD:ALL

Create two folders under /opt and modify permissions:

//创建文件夹
mkdir /opt/module
mkdir /opt/software
//修改权限
chown 你的用户名:你的用户名 /opt/module /opt/software

Delete the JDK that comes with the virtual machine:

rpm -qa | grep -i java | xargs -n1 rpm -e --nodeps

Restart the virtual machine:

reboot

So far hadoop100 configuration is complete!

Clone virtual machine, configure distributed

After restarting hadoop100, shut down the virtual machine, click on the virtual machine in the navigation bar, you will find that there is a complete virtual machine to be cloned, and then modify the name of the virtual machine to haveoop102, hadoop103, hadoop104 to clone three virtual machines respectively. Modify the network, host name and host mapping of the three cloned virtual machines in turn, and restart the virtual machine.

Remote connection using Royal TSX

Select terminal, then enter the connection name, and then connect through the IP address. There is a small key button on the left, click in, select the user name and password, and click the connection after inputting; ![Insert picture description here](https:/ /img-blog.csdnimg.cn/82d2b9ab67414da89f541a7b8e6ce5e1.png) ![Insert picture description here](https://img-blog.csdnimg.cn/5a2bca8e2d104bfa8247cc60417b8e1e.png) If you want to resume SFTP connection is also possible, create a File Tranform connection, select SFTP, enter the IP address, there is a small key on the left, just use the user name and password to connect. At this point the virtual machine part is ready!

The next article continues to talk about how to configure the Hadoop operating environment...

Guess you like

Origin blog.csdn.net/weixin_45386694/article/details/129039264