bigdata@ubuntucmbigdata1:~$ sudo /etc/init.d/mysql startstart: Job is already running: mysqlbigdata@ubuntucmbigdata1:~$ sudo /etc/init.d/mysql stopmysql stop/waitingbigdata@ubuntucmbigdata1:~$ sudo /etc/init.d/mysql startmysql start/running, process 2169bigdata@ubuntucmbigdata1:~$ sudo /opt/cm-5.6.0/etc/init.d/cloudera-scm-server startStarting cloudera-scm-server: * Couldn't start cloudera-scm-serverbigdata@ubuntucmbigdata1:~$ java -versionjava version "1.8.0_60"Java(TM) SE Runtime Environment (build 1.8.0_60-b27)Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)bigdata@ubuntucmbigdata1:~$ vim /etc/profilebigdata@ubuntucmbigdata1:~$ java -versionjava version "1.8.0_60"Java(TM) SE Runtime Environment (build 1.8.0_60-b27)Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)bigdata@ubuntucmbigdata1:~$
bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-server$ pwd/opt/cm-5.6.0/log/cloudera-scm-serverbigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-server$ lltotal 12drwxr-xr-x 2 bigdata bigdata 4096 6月 25 19:52 ./drwxr-xr-x 5 bigdata bigdata 4096 2月 12 2016 ../-rw-r--r-- 1 root root 730 6月 25 21:08 cloudera-scm-server.outbigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-server$ cat cloudera-scm-server.out +======================================================================+| Error: JAVA_HOME is not set and Java could not be found |+----------------------------------------------------------------------+| Please download the latest Oracle JDK from the Oracle Java web site || > http://www.oracle.com/technetwork/java/javase/index.html < || || Cloudera Manager requires Java 1.6 or later. || NOTE: This script will find Oracle Java whether you install using || the binary or the RPM based installer. |+======================================================================+bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-server$
解决办法
一个是OS的环境变量,一个是脚本运行时候的设置
bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/etc/init.d$ sudo vim cloudera-scm-server
export JAVA_HOME=/usr/java/jdk.1.7.0_80
它的下载链接
http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
bigdata@ubuntucmbigdata1:~$ sudo /opt/cm-5.6.0/etc/init.d/cloudera-scm-server startStarting cloudera-scm-server: * cloudera-scm-server startedbigdata@ubuntucmbigdata1:~$