192.168.2.101 hadoop beixin*K88
切记一定要用hadoop账户
停止hadoop集群
cd /opt/hadoop-2.6.0/sbin
./stop-all.sh
hbase集群关闭
cd /opt/hbase-0.98.11/bin
./stop-hbase.sh
zookeeper集群关闭
server.0=bx101:2888:3888
server.1=bx102:2888:3888
server.2=bx103:2888:3888
server.3=bx104:2888:3888
server.4=bx105:2888:3888
直接执行下面命令
cd /opt/zookeeper-3.4.6/bin
./zkServer.sh stop
192.168.2.106上面关闭oozie
oozie关闭
cd /opt/oozie-4.2.0/bin
./oozied.sh stop
192.168.2.102上面关闭spark
cd /opt/spark/sbin
drill关闭
启动集群
root登陆102
service ntpd status
service ntpd start
同步
root账户ntp同步时间(10分钟后)
ntpdate 192.168.2.102
关闭iptables root
[root@hadoop05 ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
service iptables stop
或者 chkconfig --list
开启: chkconfig iptables on
关闭: chkconfig iptables off
service iptables status
service iptables stop
jdk配置
root账户 java 的环境变量配置一定要看准
[hadoop@bx101 profile.d]$ cat /etc/profile.d/vrvbigdata.sh
export KYLIN_HOME=/opt/kylin
export JAVA_HOME=/usr/local/jdk
export JRE_HOME=/usr/local/jdk
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export ZOOKEEPER_HOME=/usr/local/zookeeper
export HADOOP_PREFIX=/usr/local/hadoop
export HADOOP_HOME=${HADOOP_PREFIX}
export HADOOP_MAPRED_HOME=${HADOOP_HOME}
export HADOOP_COMMON_HOME=${HADOOP_HOME}
export HADOOP_HDFS_HOME=${HADOOP_HOME}
export YARN_HOME=${HADOOP_HOME}
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export HDFS_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export YARN_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:/usr/local/hadoop/sbin:/usr/local/hadoop/bin:
export HIVE_HOME=/usr/local/hive
export PATH=$PATH:$HIVE_HOME/bin
export HBASE_HOME=/usr/local/hbase
export HBASE_HOME=/opt/hbase-0.98.11
export PATH=$PATH:$HBASE_HOME/bin
export SPARK_HOME=/usr/local/spark
export PATH=$PATH:$SPARK_HOME/bin
export CATALINA_HOME=/opt/tomcat
export PATH=$PATH:$CATALINA_HOME/bin
export OOZIE_HOME=/opt/oozie-4.2.0
export PATH=$PATH:$OOZIE_HOME/bin
SCALA_HOME=/usr/local/scala
PATH=$SCALA_HOME/bin:$PATH
export MAVEN_HOME=/opt/maven
export PATH=${MAVEN_HOME}/bin:${PATH}
激活
source /etc/profile.d/vrvbigdata.sh
102和103数据库启动
root账户
service mysqld start
service mysqld status
zookeeper启动
zookeeper集群
server.0=bx101:2888:3888
server.1=bx102:2888:3888
server.2=bx103:2888:3888
server.3=bx104:2888:3888
server.4=bx105:2888:3888
cd /opt/zookeeper-3.4.6/bin
./zkServer.sh status
./zkServer.sh start
101启动hadoop
./sbin/start-all.sh
./sbin/start-dfs.sh
检查状态是否正常
bin/hadoop dfsadmin -report
yarn node -list
查看活跃状态的namenode 192.168.2.101:50070
HADOOP_HOME/bin/hdfs haadmin -transitionToStandby --forcemanual namenode102
101启动hive
hive --service metastore &
hive --service hiveserver -p 10001 &
./mr-jobhistory-daemon.sh start historyserver
./httpfs.sh start
//启动oozie程序
[hadoop@bx102/oozie-4.2.0]
bin/oozied.sh start
[hadoop@bx106/oozie-4.2.0]
bin/oozied.sh start
drill启动
[hadoop@bx101 bin]$ ./drillbit-all.sh start
[hadoop@bx101 bin]$ pwd
tomcat启动
./startup.sh