请教, CDH 集群管理工具, centos 普通用户可以安装吗?还是必须使用 root 用户

2019-04-02 17:20:13 +08:00
 lcdxiangzi
用好几台机器尝试过,普通用户都在报错,sudo 也不行。一定要 root 用户直接操作才可以吗?
+======================================================================+
| Error: Unable to find a compatible version of Java on this host,|
| either because JAVA_HOME has not been set or because a |
| compatible version of Java is not installed. |
+----------------------------------------------------------------------+
| Please install either: |
| - a supported version of the Oracle JDK from the Oracle Java web |
| site: |
| > http://www.oracle.com/technetwork/java/javase/index.html < |
| OR |
| - a supported version of the OpenJDK from your OS vendor. Help for |
| some OSes are available at: |
| > http://openjdk.java.net/install/ < |
| |
| Cloudera Manager requires Oracle JDK or OpenJDK 1.8 or later. |
| NOTE: Cloudera Manager will find the Oracle JDK when starting, |
| regardless of whether you installed the JDK using a binary |
| installer or the RPM-based installer. |
+======================================================================+
error: %pre(cloudera-manager-server-6.2.0-968826.el7.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package cloudera-manager-server-6.2.0-968826.el7.x86_64
验证中 : cloudera-manager-agent-6.2.0-968826.e 1/3
验证中 : cloudera-manager-daemons-6.2.0-968826 2/3
验证中 : cloudera-manager-server-6.2.0-968826. 3/3

已安装:
cloudera-manager-agent.x86_64 0:6.2.0-968826.el7

失败:
cloudera-manager-daemons.x86_64 0:6.2.0-968826.el7
cloudera-manager-server.x86_64 0:6.2.0-968826.el7



只要是 sudo,就会报这个错,如果 su - root 后,就可以成功。
新手上路有点懵,一般情况下 root 用户都不大用的啊。
5950 次点击
所在节点    Hadoop
27 条回复
liprais
2019-04-02 17:28:59 +08:00
| Error: Unable to find a compatible version of Java on this host,|
| either because JAVA_HOME has not been set or because a |
| compatible version of Java is not installed. |

这行没看到么......
boris1993
2019-04-02 19:18:35 +08:00
1 楼正解

请学会阅读程序的输出,而不是全靠蒙全靠猜
lcdxiangzi
2019-04-03 08:52:28 +08:00
@liprais 报错日志肯定会看的。这个都看到了,我本地 java 都装好的。但是实际的问题是,非 root 安装就是报错,尝试了两次了。root 安装,同样的命令就可以通过。我都是尝试过的。
lcdxiangzi
2019-04-03 08:54:11 +08:00
@boris1993
@liprais
而且我本地 java 也是 1.8.x 的版本,所以有点懵逼。搞不懂
boris1993
2019-04-03 08:58:21 +08:00
所以检查 JAVA_HOME 的值对不对
lcdxiangzi
2019-04-03 09:02:42 +08:00
@boris1993
/etc/profile 内容如下
export JAVA_HOME=/home/hadoop/jdk1.8.0_161
export JRE_HOME=/home/hadoop/jdk1.8.0_161/jre
export CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export HADOOP_HOME=/home/hadoop/hadoop-3.1.1
export HIVE_HOME=/home/hadoop/apache-hive-3.1.0-bin
export HBASE_HOME=/home/hadoop/hbase-1.4.8
export ZOOKEEPER_HOME=/home/hadoop/zookeeper-3.4.12
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$HIVE_HOME/bin:$HBASE_HOME/bin:$ZOOKEEPER_HOME/bin:$ZOOKEEPER_HOME/conf
应该是正常的吧,因为我现在搭 cdh 用的都是之前跑过原生 hadoop 的环境。
defunct9
2019-04-03 09:04:33 +08:00
开 ssh,让我上去试试
lcdxiangzi
2019-04-03 09:08:55 +08:00
@defunct9 这个搞不定,公司的服务器,虽然是测试环境,但是肯定没有对外开放的。你需要看什么,我可以贴上来
defunct9
2019-04-03 09:29:49 +08:00
猜不了火车
catcalse
2019-04-03 09:35:57 +08:00
vi ~/.bashrc
source ~/.bashrc
scalaer
2019-04-03 09:36:14 +08:00
你看看 jps 能用不
lcdxiangzi
2019-04-03 09:39:24 +08:00
正在解决依赖关系
--> 正在检查事务
---> 软件包 cloudera-manager-agent.x86_64.0.6.2.0-968826.el7 将被 安装
---> 软件包 cloudera-manager-daemons.x86_64.0.6.2.0-968826.el7 将被 安装
---> 软件包 cloudera-manager-server.x86_64.0.6.2.0-968826.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=======================================================================================================
Package 架构 版本 源 大小
=======================================================================================================
正在安装:
cloudera-manager-agent x86_64 6.2.0-968826.el7 cloudera-manager 9.7 M
cloudera-manager-daemons x86_64 6.2.0-968826.el7 cloudera-manager 1.1 G
cloudera-manager-server x86_64 6.2.0-968826.el7 cloudera-manager 9.8 k

事务概要
=======================================================================================================
安装 3 软件包

总下载量:1.1 G
安装大小:1.4 G
Is this ok [y/d/N]: y
Downloading packages:
(1/3): cloudera-manager-agent-6.2.0-968826.el7.x86_64.rpm | 9.7 MB 00:00:07
(2/3): cloudera-manager-server-6.2.0-968826.el7.x86_64.rpm | 9.8 kB 00:00:00
(3/3): cloudera-manager-daemons-6.2.0-968826.el7.x86_64.rpm | 1.1 GB 00:03:22
-------------------------------------------------------------------------------------------------------
总计 5.6 MB/s | 1.1 GB 00:03:22
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : cloudera-manager-daemons-6.2.0-968826.e [######################### ] 1/3^ 正在安装 : cloudera-manager-daemons-6.2.0-968826.el7.x86_64 1/3
正在安装 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 2/3
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service.
正在安装 : cloudera-manager-server-6.2.0-968826.el7.x86_64 3/3
验证中 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 1/3
验证中 : cloudera-manager-daemons-6.2.0-968826.el7.x86_64 2/3
验证中 : cloudera-manager-server-6.2.0-968826.el7.x86_64 3/3

已安装:
cloudera-manager-agent.x86_64 0:6.2.0-968826.el7 cloudera-manager-daemons.x86_64 0:6.2.0-968826.el7
cloudera-manager-server.x86_64 0:6.2.0-968826.el7

完毕!


这次是 root 用户安装的,成功了。貌似我开出来的普通用户有哪里没有配置好?算了,暂时觉得 root 一路走下去了。实在不能再等了。
感谢回复的各位
lcdxiangzi
2019-04-03 09:40:43 +08:00
@catcalse
.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
lcdxiangzi
2019-04-03 09:41:40 +08:00
@mggis0or1
jps 好用的
[SNOTEST02][root][/root]#jps
19650 Jps
7701 QuorumPeerMain
[SNOTEST02][root][/root]#
lcdxiangzi
2019-04-03 09:42:14 +08:00
大家感兴趣可以继续讨论,需要啥,告诉我,我来贴。两条路一起走吧。应该不影响的。
fireapp
2019-04-03 09:51:53 +08:00
一步步试,先 suodo yum install cloudera-manager-agent.x86_64 安装下试试
fireapp
2019-04-03 09:56:21 +08:00
再 sudo export JAVA_HOME=java_path && sudo yum install cloudera-manager-agent.x86_64 继续试
lcdxiangzi
2019-04-03 10:04:16 +08:00
@fireapp #16 试过,报错。
#17 sudo export 好像不可以合用吧,我把 sudo 拿掉,试下
fireapp
2019-04-03 10:09:55 +08:00
继续写个脚步 ,export && yum install,然后 sudo 执行它
lcdxiangzi
2019-04-03 10:14:11 +08:00
@fireapp #17
+======================================================================+
| Error: Unable to find a compatible version of Java on this host,|
| either because JAVA_HOME has not been set or because a |
| compatible version of Java is not installed. |
+----------------------------------------------------------------------+
| Please install either: |
| - a supported version of the Oracle JDK from the Oracle Java web |
| site: |
| > http://www.oracle.com/technetwork/java/javase/index.html < |
| OR |
| - a supported version of the OpenJDK from your OS vendor. Help for |
| some OSes are available at: |
| > http://openjdk.java.net/install/ < |
| |
| Cloudera Manager requires Oracle JDK or OpenJDK 1.8 or later. |
| NOTE: Cloudera Manager will find the Oracle JDK when starting, |
| regardless of whether you installed the JDK using a binary |
| installer or the RPM-based installer. |
+======================================================================+
error: %pre(cloudera-manager-daemons-6.2.0-968826.el7.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package cloudera-manager-daemons-6.2.0-968826.el7.x86_64
error: cloudera-manager-daemons-6.2.0-968826.el7.x86_64: install failed
正在安装 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 2/2
Created symlink from /etc/systemd/system/multi-user.target.wants/cloudera-scm-agent.service to /usr/lib/systemd/system/cloudera-scm-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/supervisord.service to /usr/lib/systemd/system/supervisord.service.
验证中 : cloudera-manager-agent-6.2.0-968826.el7.x86_64 1/2
验证中 : cloudera-manager-daemons-6.2.0-968826.el7.x86_64 2/2

已安装:
cloudera-manager-agent.x86_64 0:6.2.0-968826.el7

失败:
cloudera-manager-daemons.x86_64 0:6.2.0-968826.el7

完毕!


还是报错

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/551330

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX