CentOS6.5安装CM5.13

注:图片如果损坏,点击文章链接:https://www.toutiao.com/i6610650059971232269/

 

安装好虚拟机(2个节点)

  1. YUM源已安装好、系统版本CentOS6.5、java版本是1.7,两台节点,免密已配置完成。
CentOS6.5安装CM5.13

 

系统版本

CentOS6.5安装CM5.13

 

免密配置

CentOS6.5安装CM5.13

 

Hosts文件

CentOS6.5安装CM5.13

 

查看系统java版本

CentOS6.5安装CM5.13

 

二、YUM安装

yum install -y lrzsz

yum install -y vim

yum install -y openssh-clients

yum install -y wget

yum -y install createrepo

yum install -y httpd

yum install -y ntp

  1. 安装httpd服务

将httpd服务加入自启动服务并启动

CentOS6.5安装CM5.13

 

出现问题(没出现可忽略)

CentOS6.5安装CM5.13

 

修改配置文件

CentOS6.5安装CM5.13

 

重启服务

CentOS6.5安装CM5.13

 

检查端口

CentOS6.5安装CM5.13

 

访问下服务

CentOS6.5安装CM5.13

 

  1. 安装NTP服务
CentOS6.5安装CM5.13

 

其中EDT需要修改为CST

CentOS6.5安装CM5.13

 

CentOS6.5安装CM5.13

 

进行配置

CentOS6.5安装CM5.13

 

配置内容

CentOS6.5安装CM5.13

 

执行对时

CentOS6.5安装CM5.13

 

将时间写入硬件(这步如果不执行重启机器后时间又会出问题)

CentOS6.5安装CM5.13

 

完成以上配置后,在集群所有节点执行如下命令

CentOS6.5安装CM5.13

 

另外一台节点也需要配置(操作步骤同上,其中的配置)

CentOS6.5安装CM5.13

 

检查端口,存在udp的123端口,则表示我们的ntp服务器已经建立并启动了

CentOS6.5安装CM5.13

 

检查是否有与上层ntp服务器联机

CentOS6.5安装CM5.13

 

查看两个节点的时间

CentOS6.5安装CM5.13

 

CentOS6.5安装CM5.13

 

  1. 安装Mysql
CentOS6.5安装CM5.13

 

CentOS6.5安装CM5.13

 

卸载已经安装的

CentOS6.5安装CM5.13

 

再查看是否有安装好的(已经没有了)

CentOS6.5安装CM5.13

 

下载Mysql

wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

CentOS6.5安装CM5.13

 

然后我们继续执行

CentOS6.5安装CM5.13

 

用yum repolist mysql这个命令查看一下是否已经有mysql可安装文件

CentOS6.5安装CM5.13

 

安装Mysql

CentOS6.5安装CM5.13

 

启动Mysql

CentOS6.5安装CM5.13

 

由于mysql刚刚安装完的时候,mysql的root用户的密码默认是空的,所以我们需要及时用mysql的root用户登录(第一次回车键,不用输入密码),并修改密码

CentOS6.5安装CM5.13

 

使用mysql库

CentOS6.5安装CM5.13

 

更新密码

update user set password=PASSWORD("") where User='root';

CentOS6.5安装CM5.13

 

刷新配置

CentOS6.5安装CM5.13

 

查看mysql是否自启动,并且设置开启自启动命令

CentOS6.5安装CM5.13

 

开机自启动

CentOS6.5安装CM5.13

 

测试进入数据库

CentOS6.5安装CM5.13

 

mysql安全设置(系统会一路问你几个问题,基本上一路yes)

CentOS6.5安装CM5.13

 

三、创建CDH所需要的数据库

1、创建metastore数据库

CentOS6.5安装CM5.13

 

create database metastore default character set utf8;

CREATE USER 'hive'@'%'IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON metastore.* TO 'hive'@'%';

FLUSH PRIVILEGES;

2、创建cm数据库

CentOS6.5安装CM5.13

 

create database cm default character set utf8;

CREATE USER 'cm'@'%'IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON cm. * TO 'cm'@'%';

FLUSH PRIVILEGES;

3、创建am数据库

CentOS6.5安装CM5.13

 

create database am default character set utf8;

CREATE USER 'am'@'%'IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON am. * TO 'am'@'%';

FLUSH PRIVILEGES;

  1. 创建rm数据库

create database rm default character set utf8;

CREATE USER 'rm'@'%'IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON rm. * TO 'rm'@'%';

FLUSH PRIVILEGES;

  1. 创建hue数据库

create database hue default character set utf8;

CREATE USER 'hue'@'%'IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON hue. * TO 'hue'@'%';

FLUSH PRIVILEGES;

  1. 创建oozie数据库

create database oozie default character set utf8;

CREATE USER 'oozie'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON oozie. * TO 'oozie'@'%';

FLUSH PRIVILEGES;

  1. 创建sentry数据库
CentOS6.5安装CM5.13

 

create database sentry default character set utf8;

CREATE USER 'sentry'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON sentry.* TO 'sentry'@'%';

FLUSH PRIVILEGES;

查看所有数据库

CentOS6.5安装CM5.13

 

四、配置CM的yum源

在/var/www/html下新增cm5.13目录

CentOS6.5安装CM5.13

 

下载CM5.13版本的RPM安装包

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-agent-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-daemons-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-server-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/cloudera-manager-server-db-2-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/enterprise-debuginfo-5.13.0-1.cm5130.p0.55.el6.x86_64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/jdk-6u31-linux-amd64.rpm

http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.13/RPMS/x86_64/oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm

将上述7个地址下载到/var/www/html/cm5.13目录下(我上传了些其它的文件,一会使用)

CentOS6.5安装CM5.13

 

在/var/www/html/cm5.13目录下执行命令

CentOS6.5安装CM5.13

 

验证CM是否部署成功

CentOS6.5安装CM5.13

 

在Cloudera Manager所在服务器的/etc/yum.repo.d目录下创建cm.repo文件,内容如下

CentOS6.5安装CM5.13

 

[cmrepo]

name=Cloudera Manager 5.13

baseurl=http://cdh506/cm5.13

gpgcheck=false

enable=true

验证CM的yum源是否配置成功

CentOS6.5安装CM5.13

 

五、部署CDH的Parcel

在/var/www/html目录下创建cdh5.13目录

CentOS6.5安装CM5.13

 

下载CDH5.13版本的Parcel包

http://archive.cloudera.com/cdh5/parcels/5.13/CDH-5.13.0-1.cdh5.13.0.p0.29-el6.parcel

http://archive.cloudera.com/cdh5/parcels/5.13/CDH-5.13.0-1.cdh5.13.0.p0.29-el6.parcel.sha1

http://archive.cloudera.com/cdh5/parcels/5.13/manifest.json

CentOS6.5安装CM5.13

 

验证是否部署成功

CentOS6.5安装CM5.13

 

在集群中需要安装CM服务的节点上安装MySQL的驱动

我们进入到下面的目录

CentOS6.5安装CM5.13

 

将mysql-connector-java.jar拷贝至/usr/share/java目录

CentOS6.5安装CM5.13

 

创建软链接

CentOS6.5安装CM5.13

 

六、安装Cloudera Manager Server

在CM节点使用如下命令安装Cloudera Manager Serve服务

CentOS6.5安装CM5.13

 

初始化CM数据库

进入目录

CentOS6.5安装CM5.13

 

执行命令

CentOS6.5安装CM5.13

 

启动Cloudera Manager Server

CentOS6.5安装CM5.13

 

检查端口是否监听

CentOS6.5安装CM5.13

 

访问CM

CentOS6.5安装CM5.13

posted on 2018-12-07 09:11  那山的狐狸  阅读(338)  评论(0编辑  收藏  举报

导航