I. Introduction
In order to complete the project requirements, it is very troublesome to reconfigure a new virtual machine. The fastest way is to modify the existing virtual machine so that it can be used after meeting the project requirements.
There is no doubt that when we modify the host name, we must also modify any other configuration files that use the host name as address mapping . So what are these configuration files?
2. Process
1. Modify the host name
hostnamectl set-hostname 主机名
2.core-site.xml
Modify the core-site.xml file in the etc/hadoop/ directory of hadoop
%HADOOP_HOME%/etc/hadoop/
vi core-site.xml
3.yarn-site.xml
Modify the yarn-site.xml file in the etc/hadoop/ directory of hadoop
%HADOOP_HOME%/etc/hadoop/
vi yarn-site.xml
4.hbase-site.xml
Modify the hbase-site.xml file in the conf directory of HBase
%HBASE_HOME%/conf/
vi hbase-site.xml
5. hosts file under Windows
Add a new host name and address mapping in the hosts file under Windows (hosts needs to be opened with administrator privileges)
文件位置:
C:\Windows\System32\drivers\etc\hosts
#hosts文件末尾添加:
虚拟机ip 主机名
6. The hosts file under the virtual machine
文件位置:
/etc/hosts
#hosts文件末尾添加:
虚拟机ip 主机名
Summarize
After modifying the above configuration file, the virtual machine can basically be used normally in the future.