Cloudera 安装在 CentOS 上检测不到 root 权限

Cloudera installation failed to detect root privileges on CentOS

我尝试将新主机添加到 CentOS 集群中。安装失败,状态为 "Installation failed. Failed to detect root privileges"。 我知道 Cloudera 需要用户拥有无密码权限 ("Root access to your hosts is required to install the Cloudera packages. This installer will connect to your hosts via SSH and log in either directly as root or as another user with password-less sudo/pbrun privileges to become root.")。我怎样才能做到这一点?我试图编辑 /etc/sudoers 文件。 编辑:在 sudoers 文件中,我添加了以下行:

cdh ALL=(ALL): ALL #cdh is my username

就在 'root' 权限定义的下方。

但安装不再成功。在详细信息 window 中,它说:

Detecting root privileges...
effective UID is 502
BEGIN which pbrun 
END (1) 
BEGIN sudo -S id 
[sudo] password for cdh: 
Sorry, try again. 
[sudo] password for cdh: 
Sorry, try again. 
[sudo] password for cdh: 
Sorry, try again. 
sudo: 3 incorrect password attempts 
END (1) 
need root privileges but sudo requires password, exiting 
closing logging file descriptor.

我们将不胜感激任何形式的帮助。

你需要没有密码的 root 权限,所以你的 /etc/sudoers 行看起来像这样,

cloudera ALL =(ALL) NOPASSWD: ALL

Ubuntu 对我有用的东西:

编辑/etc/sudoers

添加行:

 userid ALL=(ALL:ALL) NOPASSWD: ALL

而不是 userid 将您的用户名与您用于安装 Cloudera 的 sudo 权限放在一起。

在之前的安装步骤中,添加主机的地方,请确保您输入了该用户名和密码。

/etc/sudoers中取消注释这一行

## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL