0

after extracting hadoop I open my .bashrc file and edit this

export HADOOP_HOME="/media/hadoop/linux/soft/hadoop-1.2.1"
PATH=$PATH:$HADOOP_HOME/bin
export PATH

then save and open new terminal and type hadoop version but it say the permission problem of bash.

bash: /media/hadoop/linux/soft/hadoop-1.2.1/bin/hadoop: Permission denied

so what permission should I give??????

the command ls -l /media/hadoop/linux/soft/hadoop-1.2.1/bin

shows the result

total 144
-rw------- 1 hadoop hadoop 15147 জুল    23  2013 hadoop
-rw------- 1 hadoop hadoop  2643 জুল    23  2013 hadoop-config.sh
-rw------- 1 hadoop hadoop  5064 জুল    23  2013 hadoop-daemon.sh
-rw------- 1 hadoop hadoop  1329 জুল    23  2013 hadoop-daemons.sh
-rw------- 1 hadoop hadoop  2810 জুল    23  2013 rcc
-rw------- 1 hadoop hadoop  2050 জুল    23  2013 slaves.sh
-rw------- 1 hadoop hadoop  1166 জুল    23  2013 start-all.sh
-rw------- 1 hadoop hadoop  1065 জুল    23  2013 start-balancer.sh
-rw------- 1 hadoop hadoop  1745 জুল    23  2013 start-dfs.sh
-rw------- 1 hadoop hadoop  1145 জুল    23  2013 start-jobhistoryserver.sh
-rw------- 1 hadoop hadoop  1259 জুল    23  2013 start-mapred.sh
-rw------- 1 hadoop hadoop  1119 জুল    23  2013 stop-all.sh
-rw------- 1 hadoop hadoop  1116 জুল    23  2013 stop-balancer.sh
-rw------- 1 hadoop hadoop  1246 জুল    23  2013 stop-dfs.sh
-rw------- 1 hadoop hadoop  1131 জুল    23  2013 stop-jobhistoryserver.sh
-rw------- 1 hadoop hadoop  1168 জুল    23  2013 stop-mapred.sh
-rw------- 1 hadoop hadoop 63598 জুল    23  2013 task-controller

the unique part is that I try to install from downloaded file and stuck with some bash permission problem.Although if I follow the whole process of it. I may install hadoop properly but I want to know what's wrong with my process also notice that I follow this video.thanks

3 Answers3

0

It seems like the hadoop user does not have the required permissions.

Try: sudo chown -R hduser:hadoop /media/hadoop/linux/soft/hadoop-1.2.1

This command will make hduser (part of group hadoop) to be the owner of the directory /media/hadoop/linux/soft/hadoop-1.2.1. To do that recursively i.e. for all files and directories (and all files and directories within any directory), -R option is used.

Racing
  • 157
  • 10
0

You want to move the Hadoop installation to the /usr/local/hadoop directory. So, we should create the directory first:

hduser@Soumitra-PC:~$ sudo mkdir -p /usr/local/hadoop
[sudo] password for hduser:
hduser is not in the sudoers file. This incident will be reported.

This can be resolved by logging in as a root user, and then add hduser to sudo group:

hduser@Soumitra-PC:~/hadoop-2.6.0$ su soumitra
Password:
soumitra@Soumitra-PC:/home/hduser$ sudo adduser hduser sudo
[sudo] password for soumitra:
Adding user hduser' to groupsudo' ...
Adding user hduser to group sudo
Done.

Now, the hduser has root privilege, we can move the Hadoop installation to the /usr/local/hadoop directory without any problem:

soumitra@Soumitra-PC:/home/hduser$ sudo su hduser
hduser@Soumitra-PC:~$ sudo mkdir -p /usr/local/hadoop
[sudo] password for hduser:

Please not, before going into the next step, don’t forget to do a cd and go into the directory hadoop-2.6.0.

hduser@Soumitra-PC:~/hadoop-2.6.0$ sudo mv * /usr/local/hadoop

Detailed Step-by-Step Installation of Hadoop on Ubuntu, with detailed screenshots and Explanation:

https://drive.google.com/file/d/0B0YcHWv8cfAjdzAxbjlReUNLWUU/view

This document has been created by me after installing several versions of Hadoop on several versions of Ubuntu. So, most of the common problems/errors/queries that a person faces while installing Hadoop on Ubuntu has been discussed in the above document.

0

When you are saving the "~/.bashrc" file, you need to do execute "source ~/.bashrc" command as well, to update the change you made in ~/.bashrc.

Then while opening new terminal, you need to do "su hduser". It should ask for password, enter the password. Now when you are in hduser mode, try running your hadoop version command. It should work.

Still if the problem persists, I would suggest you try installing hadoop afresh: Follow the link below. I have prepared this with sufficient explanations and step-by-step screenshots:

https://writetosoumitra.blogspot.in/

If you are stuck somewhere, feel free to ask.

Thank you.