Hadoop_Hbase集群完全离线安装[CDH 5.13.1]

here

 一、环境准备:(这儿准备了三台虚拟机:内存6-3-3)

JDK:
yum -y remove java java-1.6.0-openjdk
rpm -e java-1.7.0-openjdk-headless
rpm -e java-1.8.0-openjdk-headless
yum install chkconfig python bind-utils psmisc libxslt zlib sqlite fuse fuse-libs redhat-lsb cyrus-sasl-plain cyrus-sasl-gssapi -y
vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_162
export CLASSPATH=.:${JAVA_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

#1 vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hadoop1

#2 cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.243.129 node-1
192.168.243.133 node-2
192.168.243.134 node-3

#3 selinux关闭
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
sestatus

#4  firewall
systemctl stop firewalld
systemctl disable firewalld

#5 NTP
http://blog.csdn.net/scorpio3k/article/details/49645219
systemctl restart ntpd
chkconfig --level 35 ntpd on

#6 SSH无密码登录配置 
http://www.cnblogs.com/book-gary/p/5761268.html
ssh node-1 date;ssh node-2 date;ssh node-3 date

#7 ulimit -a
cat  /etc/security/limits.d/20-nproc.conf
*          soft    nproc     unlimited
*          soft    nproc     unlimited
*          hard    nproc     unlimited
*          hard    nproc     unlimited
*          soft    nofile    65535
*          hard    nofile    65535

#8 降低虚拟内存需求率
cat /proc/sys/vm/swappiness
echo 0 > /proc/sys/vm/swappiness
永久降低虚拟内存需求率
echo 'vm.swappiness = 0' > /etc/sysctl.d/swappiness.conf
并运行如下命令使生效
sysctl -p

#9 检查透明大页面
cat /sys/kernel/mm/transparent_hugepage/defrag
vi /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
chmod +x /etc/rc.d/rc.local
JDK和系统设置

 

二、安装mysql(参考 http://www.cnblogs.com/book-gary/p/5511628.html)

mysql -uroot -pbook_123321
set global validate_password_policy=0;
set global validate_password_length=4;
grant all privileges on *.* to 'scm'@'%' identified by 'me_123321';
flush privileges;
https://www.58jb.com/html/162.html

  

三、下载CDH-5.13.1-1离线包

#cloudera-manager
cloudera-manager-centos7-cm5.13.1_x86_64.tar.gz

# cdh
CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel
CDH-5.13.1-1.cdh5.13.1.p0.2-el7.parcel.sha1  //需要重命名,否则会重新下载
manifest.json

# 
mysql-connector-java-5.1.45.tar.gz

 

四、安装Cloudera Manager Server 和Agent

      参考http://blog.csdn.net/gtsina/article/details/78048925   

      关注如下操作:

cd /opt
tar -zxvf cloudera-manager-centos7-cm5.13.1_x86_64.tar.gz
#修改/opt/cm-5.13.1/etc/cloudera-scm-agent/config.ini中的server_host为主节点的主机名
vi /opt/cm-5.13.1/etc/cloudera-scm-agent/config.ini

cp mysql-connector-java-5.1.45-bin.jar   /opt/cm-5.13.1/share/cmf/lib/
useradd --system --home=/opt/cm-5.13.1/run/cloudera-scm-server/ --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
/opt/cm-5.13.1/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost -uroot -pbook_123321 --scm-host localhost scm book_123321 scm

tail -f /opt/cm-5.13.1/log/cloudera-scm-agent/cloudera-scm-agent.log
tail -f /opt/cm-5.13.1/log/cloudera-scm-server/cloudera-scm-server.log

/opt/cm-5.13.1/etc/init.d/cloudera-scm-server restart
#rm -f /opt/cm-5.13.1/lib/cloudera-scm-agent/cm_guid
/opt/cm-5.13.1/etc/init.d/cloudera-scm-agent restart
View Code

 

五、结果

$ ./hbase  shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/spark-billing/opt/hbase-1.3.1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/spark-billing/opt/hadoop-2.7.5/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr  6 19:36:54 PDT 2017

hbase(main):001:0> status
1 active master, 0 backup masters, 3 servers, 0 dead, 0.6667 average load

hbase(main):002:0> 
访问部署成功的Hbase

 

over!

 

posted on 2018-01-23 16:43  光标  阅读(1250)  评论(0编辑  收藏  举报

导航