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

黄舟
Release: 2017-06-06 10:36:31
Original
3463 people have browsed it

When Ubuntu builds hadoop, there are some commonly used tools under the paths of installationroot directory>/bin, /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//.bashrc file

vim /home/hadoop/.bashrc
Copy after login

(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
Copy after login

(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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template