【CDH实战】- 01.安装Cloudera_Hadoop集群(CentOS6.5+CDH 5.6)

Tani ·
更新时间:2024-11-13
· 706 次阅读

概述:本次实验部署两台服务器,采用RPM安装的方式。

实验环境:
CentOS 6.5
CDH 5.6

操作系统基本设置 # IP设置 # Hostname 设置 # hosts 设置 # selinux 设置 # 防火墙设置 配置 httpd 服务 # 检查 httpd 是否安装 # 安装 httpd # 启动httpd服务 service httpd restart

设置必要的软件 yum 源

配置Java JDK(每个节点)

#安装jdk yum install -y oracle-j2sdk1.7-1.7.0+update67-1 #配置Java环境变量 echo -e 'export JAVA_HOME=/usr/java/default' >> /etc/profile alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_67-cloudera/bin/java 200 alternatives --set java /usr/java/jdk1.7.0_67-cloudera/bin/java alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_67-cloudera/bin/javac 200 alternatives --set javac /usr/java/jdk1.7.0_67-cloudera/bin/javac 安装 cloudera-manager-agent(每个节点) #安装命令 yum install cloudera-manager-agent 安装 cloudera-manager-server-db(cloudera manager 节点) #安装命令 yum install cloudera-manager-server-db 安装后检查 #检查 cloudera 安装包 rpm -qa | grep -i cloudera

检查cloudera包

#检查 cloudera 服务 chkconfig | grep -i cloudera

检查cloudera服务
8. 启动服务

#启动 cloudera-scm-server-db 服务 service cloudera-scm-server-db start [root@elephant ~]# service cloudera-scm-server-db start The files belonging to this database system will be owned by user "cloudera-scm". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF8. The default text search configuration will be set to "english". fixing permissions on existing directory /var/lib/cloudera-scm-server-db/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 32MB creating configuration files ... ok creating template1 database in /var/lib/cloudera-scm-server-db/data/base/1 ... ok initializing pg_authid ... ok setting password ... ok initializing dependencies ... ok creating system views ... ok loading system objects' descriptions ... ok creating conversions ... ok creating dictionaries ... ok setting privileges on built-in objects ... ok creating information schema ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok copying template1 to postgres ... ok Success. You can now start the database server using: postgres -D /var/lib/cloudera-scm-server-db/data or pg_ctl -D /var/lib/cloudera-scm-server-db/data -l logfile start Adding configs Creating SCM configuration file: /etc/cloudera-scm-server/db.properties waiting for server to start.... done server started CREATE ROLE CREATE DATABASE Created db properties file /etc/cloudera-scm-server/db.properties Creating DB amon for role ACTIVITYMONITOR CREATE ROLE CREATE DATABASE Created DB for role ACTIVITYMONITOR Creating DB rman for role REPORTSMANAGER CREATE ROLE CREATE DATABASE Created DB for role REPORTSMANAGER Creating DB nav for role NAVIGATOR CREATE ROLE CREATE DATABASE Created DB for role NAVIGATOR Creating DB navms for role NAVIGATORMETASERVER CREATE ROLE CREATE DATABASE Created DB for role NAVIGATORMETASERVER Enabled remote connections waiting for server to shut down.... done server stopped DB initialization done. waiting for server to start.... done server started #启动cloudera-manager-server服务 service cloudera-manager-server start tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log 安装集群
在这里插入图片描述

在这里插入图片描述


在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

配置服务
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

测试

在这里插入图片描述

su - hdfs
hadoop fs -mkdir /user/test
hadoop fs -chown -R test.test /user/test

sudo -u hdfs hadoop fs -mkdir /user/
sudo -u hdfs hadoop fs -mkdir /user/test
sudo -u hdfs hadoop fs -chown -R test:test /user/test

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述


作者:俊男无期



cdh cloudera hadoop centos

需要 登录 后方可回复, 如果你还没有账号请 注册新账号