0
点赞
收藏
分享

微信扫一扫

关于CDH相关服务启动用户的说明

温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。


Fayson的github:

​​https://github.com/fayson/cdhproject​​


提示:代码块部分可以左右滑动查看噢


经常有人问Fayson,CDH相关服务是否可以不用root启动。关于CDH相关组件服务的启动用户,解释如下:


1.cloudera-scm-server,也即是cloudera manager服务,只在cloudera manager那台机器上有。启动用户是cloudera-scm


2.cloudera-scm-agent,所有集群内的机器都具有该服务,默认启动用户是root,具体Fayson后面再专门解释和说明。


3.Hadoop相关服务的启动用户,如Namenode,Datanode,HBase Master都是Hadoop相关的用户启动的如hdfs,hbase。


对于cloudera-scm-agent服务,默认启动用户是root,无论你是用root用户启动,还是用具有sudu权限的用户启动都是root。这个跟安装使用的用户也没有关系,无论是使用root安装的集群还是具有sudo权限的用户安装的集群。唯一解决该问题的办法只有在安装cdh集群的时候使用单一用户安装,即所有服务,包括cloudera manager,agent,或者hadoop的服务都使用同一个用户cloudera-scm用户安装,这样会导致作业,文件也都是默认使用这个一个用户,对于后期的应用只能靠手动来设置比如文件权限,属组,运行的作业也是一样。是我们并不推荐的方式,除非只是一个简单的测试系统。


这是CDH相关软件的硬限制,无法简单的做更改。但使用该用户启动,除了重大故障需要用到root的时候必须使用root外,并不影响cloudera-scm-agent的服务启动和使用,你依旧可以使用有sudu权限的普通用户来启动。同时你修改root密码也不会影响到该服务的正常启动和运行。


以下是Cloudera官方的说法:


1. running CM agent as root (this is the default)

- agent runs as root

- services run as their designated users (local or not)

- jobs can be run as the user who submitted them (local or not)


2. running CM agent as non-root (aka single user mode)

- designed for customers who does not want to run the CM agent as the root user. this is the lesser used option

- CM Agent will run as the designated non-root user and group (local or not). By default, this is the "cloudera-scm" user

- all CDH services and jobs will be run with the same user and group too

- this is enabled at cluster install time

- due to this designated user and group, file ownership/permissions has to set up accordingly.



提示:代码块部分可以左右滑动查看噢


为天地立心,为生民立命,为往圣继绝学,为万世开太平。

温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。



推荐关注Hadoop实操,第一时间,分享更多Hadoop干货,欢迎转发和分享。

关于CDH相关服务启动用户的说明_cloudera

原创文章,欢迎转载,转载请注明:转载自微信公众号Hadoop实操


举报

相关推荐

0 条评论