寫在前面:無論怎麼确認,還是淚奔了,同一個賬号以前的東西消失了,雖然不多,如同丢失了心愛的東西。
步驟:
1. 建立名為hadoop使用者組
sudo addgroup hadoop
2. 建立名為hadoop的使用者
sudo adduser --ingroup hadoop hadoop
直接一路回車
3. sudo gedit /etc/sudoers
為了讓hadoop使用sudo指令,修改該檔案,在root ALL=(ALL:ALL) ALL下面添加一行:
hadoop ALL=(ALL:ALL) ALL
原檔案備份:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
(應在此處添加修改)
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
參考連結:
http://blog.sina.com.cn/s/blog_6754000a01019zhl.html