欢迎来到天天文库
浏览记录
ID:43446150
大小:104.92 KB
页数:16页
时间:2019-10-02
《Ubuntu下创建hadoop组和hadoop用户》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、一、在Ubuntu下仓【J建hadoop组和hadoop用户增加hadoop用户组,同时在该组里增加hadoop用户,后续在涉及到hadoop操作时,我们使用该用户。1、创建hadoop用户组liusnouqian^ubuntu:sudoaddgrouphadoop[sudo]passwordforliushouqtan:Addinggrouphadoop'(GID1001)・・・Donee2、仓ij建hadoop用户sudoadduser-ingrouphadoophadoop回车后会提示输入新的UNIX密码,这是新建用户hadoop的密码,输入回车即可。如果不输入密码,
2、冋车后会重新提示输入密码,即密码不能为空。最后确认信息是否正确,如杲没问题,输入Y,回车即可。ltushouqtan@ubuntu:*$sudoadduser-ingrouphadoophaoopAddinguser'haoop*••・Addingnewuserhaoop'(1001)withgrouphadoop'・・・Creatinghomedirectory'/home/haoop*・・・Copyingfilesfrom'/etc/skel'•••EnternewUNIXpassword:RetypenewUNIXpassword:Nopasswordsupplied
3、EnternewUNIXpassword:RetypenewUNIXpassword:passwd:passwordupdatedsuccessfullyChangingtheusertnformationforhaoopEnterthenewvalue,orpressENTERforthedefaultFullName[]:RoomNumber[]:WorkPhone[]:HomePhone[]:Other[]:Istheinformationcorrect?[Y/n]Y3、为hadoop用户添加权限输入:sudogedit/etc/sudoers回车,打开sudoers
4、文件给hadoop用八赋予和root用八同样的权限liushouqtan@ubuntu:〜$sudogedit/etc/sudoersltushouqtan@ubun
5、二、用新增加的hadoop用户登录Ubuntu系统三、安装sshsudoapt-getinstallopenssh-serverhaoop@ubuntu:~$sudoapt・getinstallopenssh・server[sudo]passwordforhaoop:Readingpackagelists…DoneBuildingdependencytreeReadingstateinformation・・・
6、DoneThefollowingextrapackageswillbeinstalled:libck・connecto「0ncurses・te「Eopenssh・sftp・serverpython-requestspython-urlltb3ssh-tmport-tdSuggestedpackages:rsshmolly・guardmonkeysphereThefollowingNEWpackageswillbeinstalled:libck-connector©ncurses-ternopenssh・se「veropenssh-sftp-serverpython-requ
7、estspython-urlltb3ssh-tmport-tdOupgraded,7newlyinstalled,6toremoveand7notupgraded・Needtoget698kBofarchives・Afterthisoperation,3,832kBofadditionaldiskspacewillbeused.Doyouwanttocontinue?[Y/n]Y0%[Connectingtous.archive.ubuntu.com]
8、安装完成后,启动服务sudo/etc/init.d/sshstart查看服务是否正确启动:ps-e
9、grepsshhado
10、op@ubuntu:~$sudo/etc/xnxt.d/sshstarthadoop@ubuntu:~$ps
11、grepssh2153?00:00:00ssh・agent4046?O0:O0:0O!5sh・agent6216?00:00:00<5shd设置免密码登录,生成私钥和公钥ssh-keygen-trsa-P超大/••e«・+iadoop@ubuntu:-$ssh-keygen・trsa・PGeneratingpubltc/prtvatersakeypair,interfiletnwhichtosavethek
此文档下载收益归作者所有