Home  >  Article  >  Operation and Maintenance  >  How to set hadoop environment variables in Ubuntu (picture and text)

How to set hadoop environment variables in Ubuntu (picture and text)

黄舟
黄舟Original
2017-06-06 10:36:313456browse

When Ubuntu builds hadoop, there are some commonly used tools under the paths of 0c94c28c9d5f223c6d9e33605e25ffb9/bin, f74128eb1acd05380936e0b515ab058c/sbin

#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/484c9c49c36033c0e446db80186d0103/.bashrc file

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn