When Ubuntu builds hadoop, there are some commonly used tools under the paths of
#In order to be able to use these tools in any path without having to switch to the bin/sbin path, you need to set the hadoop environment variables (Note: The premise is that the jdk environment variable has been set, the jdk environment variable setting method).
(1) Use vim/vi/gedit and other commands to open the /home/
vim /home/hadoop/.bashrc
(2) Define the HADOOP_HOME variable, pointing to the installation root directory of hadoop
(3) Load the bin directory and sbin directory in the hadoop directory to the PATH environment variable
(4) Execute the source command on the .bashrc file to make the settings take effect immediately
source /home/hadoop/.bashrc
(5) In other paths Next, enter hadoop version to check whether the settings are correct
The above is the detailed content of How to set hadoop environment variables in Ubuntu (picture and text). For more information, please follow other related articles on the PHP Chinese website!