在centos7.4环境下安装用cm5.16安装CDH

修改ip 然后重启/etc/init.d/netwrok restart

PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=no
IPV6_DEFROUTE=no
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens32
UUID=a0ad438d-a586-4c30-b624-601b342a39c4
DEVICE=ens32
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.52.130
GATEWAY=192.168.52.2
DNS1=223.5.5.5

修改主机名

hostnamectl set-hostname bigdata-cdh01.kfk.com

修改本机DNS /etc/host

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.52.130 bigdata-cdh01.kfk.com bigdata-cdh01
192.168.52.131 bigdata-cdh02.kfk.com bigdata-cdj02
192.168.52.132 bigdata-cdh03.kfk.com bigdata-cdh03

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service (开机不启动)
systemctl status firewalld.service

禁用selinux cat /etc/sysconfig/selinux

SELINUX=disabled

临时关闭selinux

getenforce
setenforce 0
getenforce

禁用ipv6

echo "            " >> /etc/modprobe.d/dist.conf
echo "alias net-pf-10 off" >> /etc/modprobe.d/dist.conf
echo "alias ipv6 off" >> /etc/modprobe.d/dist.conf

卸载JDK

rpm -qa | grep java
rpm -e --nodeps xxx

设置文件打开数目和用户最大进程数
文件打开数目

ulimit -a

用户最大进程数

ulimit -u

设置 /etc/security/limits.conf

*    soft   nofile 32768
*    hard   nofile 1048576
*    soft   nproc  65536
*    hard   nporc  unlimited
*    soft   memlock unlimited
*    hard   memlock unlimited

ssh互信

ssh-keygen -t rsa
touch authorized_keys
chmod 600 authorized_keys
cat id_rsa.pub > authorized_keys
ssh-copy-id -i id_rsa.pub [email protected]

使用ntp进行时间同步
主节点

driftfile /var/lib/ntp/drift
restrict 192.168.52.130 nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
restrict 192.168.52.2 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
Fudge  127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor

从节点,其他节点同理

driftfile /var/lib/ntp/drift
restrict 192.168.52.131 nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
restrict 192.168.52.2 mask 255.255.255.0 nomodify notrap
server 192.168.52.130
Fudge  192.168.52.130 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor

先关闭ntpd

ntpdate 192.168.52.130
service ntpd restart
systemctl enable ntpd

ntpq -p 检查是否同步,有*表示已经同步

关闭透明大页和交换内存

    echo never > /sys/kernel/mm/transparent_hugepage/defrag
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
    echo "echo never > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.local
    chmod +x /etc/rc.d/rc.local
    echo "vm.swappiness=1" >> /etc/sysctl.conf
    sysctl -p    //使配置生效 

搭建yum源

rpm -ivh httpd-2.4.6-80.el7.centos.x86_64.rpm httpd-tools-2.4.6-80.el7.centos.x86_64.rpm
mount /dev/sr0 /mnt
ln -s /mnt centos7
/etc/yum.repos.d
[Centos-7]
name=myrepo
baseurl=http://bigdata-cdh01/centos7/
enabled=1
gpgcheck=0
yum clean all
yum makecache
yum install -y createrepo
cd /var/www/html/cm-5.16
createrepo .
cat myrepo.repo
[myrepo]
name=myrepo
baseurl=http://bigdata-cdh01/cm-5.16/
enabled=1
gpgcheck=0

安装mysql5.7数据库官网下载包(mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz)

groupadd mysql
useradd mysql -s /sbin/nologin -M -g mysql
tar -zxvf mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.13-linux-glibc2.5-x86_64 /usr/local/mysql
chown mysql:mysql -R mysql/
mkdir data
chown -R mysql:mysql data/
yum install -y perl-Data-Dumper.x86_64
yum install libaio*
./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/
scp -r support-files/mysql.server /etc/init.d/mysqld
vim /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/usr/local/mysql/dat
编辑 /etc/my.cnf
[mysqld]
user=mysql
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
log-error=/usr/local/mysql/data/error.log
pid-file=/usr/local/mysql/data/mysql/mysql.pid
tmpdir=/tmp
设置mysql开机启动
chkconfig mysqld on
修改密码alter user user() identified by "123456";flush privileges;
开启远程登录GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION;flush privileges;
查看mysql 的用户名密码select host,user,authentication_string from mysql.user;

创建数据库

create database metastore default character set utf8;
CREATE USER ‘hive‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON metastore. * TO ‘hive‘@‘%‘;
FLUSH PRIVILEGES;

create database hive default character set utf8;
CREATE USER ‘hive‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON hive. * TO ‘hive‘@‘%‘;
FLUSH PRIVILEGES;

create database cm default character set utf8;
CREATE USER ‘cm‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON cm. * TO ‘cm‘@‘%‘;
FLUSH PRIVILEGES;

create database am default character set utf8;
CREATE USER ‘am‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON am. * TO ‘am‘@‘%‘;
FLUSH PRIVILEGES;

create database rm default character set utf8;
CREATE USER ‘rm‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON rm. * TO ‘rm‘@‘%‘;
FLUSH PRIVILEGES;

create database hue default character set utf8;
CREATE USER ‘hue‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON hue. * TO ‘hue‘@‘%‘;
FLUSH PRIVILEGES;

create database oozie default character set utf8;
CREATE USER ‘oozie‘@‘%‘ IDENTIFIED BY ‘123456‘;
GRANT ALL PRIVILEGES ON oozie. * TO ‘oozie‘@‘%‘;
FLUSH PRIVILEGES;

拷贝jdbc的包,所有节点都需要安装

cd /usr/share/java/
ln -s mysql-connector-java-5.1.38-bin.jar mysql-connector-java.jar

安装元数据库
/usr/share/cmf/schema/scm_prepare_database.sh mysql cm cm 123456


用命令行安装jdk

yum list | grep oracle
yum install -y oracle-j2sdk1.7.x86_64
export JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin

主节点上安装

  yum  install -y cloudera-manager-server cloudera-manager-daemons cloudera-manager-agent

从节点上安装

  yum  install -y cloudera-manager-daemons cloudera-manager-agent

上传CDH文件

CDH-5.16.2-1.cdh5.16.2.p0.8-el7.parcel
CDH-5.16.2-1.cdh5.16.2.p0.8-el7.parcel.sha1
manifest.json
mv CDH-5.16.2-1.cdh5.16.2.p0.8-el7.parcel.sha1 CDH-5.16.2-1.cdh5.16.2.p0.8-el7.parcel.sha

启动

  systemctl start cloudera-scm-server



不选


添加服务







kafka安装

http://archive.cloudera.com/kafka/parcels/3.1.1/
KAFKA-3.1.1-1.3.1.1.p0.2-el7.parcel
KAFKA-3.1.1-1.3.1.1.p0.2-el7.parcel.sha
manifest.json
上传至 /opt/cloudera/parcel-repo
上传KAFKA-1.2.0.jar  到 /opt/cloudera/csd


原文地址:https://blog.51cto.com/12473494/2421861

时间: 2024-11-06 03:51:12

在centos7.4环境下安装用cm5.16安装CDH的相关文章

centos7.2 环境下两个数据库的安装部署

首先假如服务器上已经有一个 数据库mysql5.6.29,端口是3306. 接下来在安装一个mysql数据库,端口是3307的. 一:创建mysql编译目录 mkdir /usr/local/mysql3307 mkdir /usr/local/mysql3307/data mkdir /var/lib/mysql3307 chown -R mysql:mysql /usr/local/mysql3307 chown -R mysql:mysql /var/lib/mysql3307 二:mys

CentOS7.X环境下源码包安装部署RabbitMQ3.7.17

本文介绍在CentOS7.X环境下源码包安装部署RabbitMQ3.7.17,使用docker安装很简单,这里我就不往文章中添加.在CentOS7.X环境下使用源码包安装还是有遇到不少坑的(使用yum安装的方式官方网站有介绍,比较简单),通过这篇我的个人实践操作,能够帮助到有需要的人.搭建环境:操作系统:CentOS7.5内存大小:16GB硬盘:100G注:正文中的参数与部署路径等,请根据实际需求修改.1.软件准备:wxWidgets-3.1.2.tar.bz2otp_src_22.0.tar.

CentOS7.X环境下基于docker安装部署RabbitMQ集群

1.IP地址规划(将信息配置到/etc/hosts中)主机名 IP地址RabbitMQ01 192.168.8.131RabbitMQ02 192.168.8.132RabbitMQ03 192.168.8.133RabbitMQ04 192.168.8.1342.RabbitMQ集群安装(1)四个节点同时运行,下载RabbitMQ镜像[[email protected]~]# docker pull rabbitmq:3-management(2)四个节点分别运行,启动RabbitMQ容器 [

Windows环境下Android Studio v1.0安装教程

Windows环境下Android Studio v1.0安装教程 Windows环境下Android Studio v1.0安装教程 准备工具 JDK安装包. 要求:JDK 7以及以上版本. Android Studio安装文件. Windows: exe(包含SDK) (813 MB) exe(不包含SDK) (250 MB) zip (235 MB) Mac dmg (234 MB) zip (233 MB) Linux: zip (233 MB) 说明: 32位系统和64位系统是同一个安

【转】Windows环境下Android Studio v1.0安装教程

原文网址:http://ask.android-studio.org/?/article/9 http://android-studio.org/index.php/docs/experience/158-androidstudio-v1-0-win-install Windows环境下Android Studio v1.0安装教程 准备工具 JDK安装包.要求:JDK 7以及以上版本. Android Studio安装文件. Windows:exe(包含SDK) (813 MB)exe(不包含

源代码编译MYSQL5.6 环境下的MHA+KEEPALIVED的安装和维护

前    言 摘   要 MHA 是当 master 出现故障,挑选一个 slave 作为新的 master 并构建成新的 主从架构的管理工具.从 master 出现故障到构建成新的主从架构时间是 10-30 秒.在 master 出现故障时可能会出现 slave 同步的数据不一致的现象,此工具 可以自动应用差异的中继日志到其他 slave 上保证数据的一致性. 一.Mha 优点 1.M aster crash 时可以快速的进行故障切换. 9-12 秒内可以检测到 master 故障, 7-10

在vmware workstation10.0环境下给windows server2012R2成功安装hyper-v

有时我们在vmware workstation10.0环境中给windows server 2012R2安装Hyper-v的时候会提示"无法安装Hyper-v:虚拟机监控程序已在运行中"如图,我们可以通过设置让其顺利安装.(温馨提示,在windows8或者8.1中如果你添加了Hyper-v功能后不可用也可以通过此方法来解决) 第一步,打开虚拟机设置选择处理器勾选中"虚拟化Intel VT-x/EPT 或AMD-V/RVT(V)" 第二步:打开虚拟机文件选中后缀名为&

CentOS7.x-lnmp环境下安装Discuz论坛

1.安装lnmp.这里采用一键安装的包 yum -y install wget wget http://soft.vpser.net/lnmp/lnmp1.6-full.tar.gz 2.加压安装lnmp,具体参考官网安装:https://lnmp.org/install.html 解压包:tar  zxvf  lnmp1.6-full.tar.gz 进入包,执行安装脚本: 选择安装需要版本的软件 检查是否安装成功,有没有进程 ps aux|grep  nginx ps aux|grep  ph

在centos6.x和centos7.x环境下停机扩容docker的pool空间

一.首先介绍一下docker的存储驱动Device Mapper插件的工作原理 如果在CentOS .REHL .Fedor或者其他默认没有 AUFS支持的Linux发行版上使用Docker,你需要用到Device Mapper的存储插件.将这个插件设置为默认,它会把你所有的容器存储到一个100G的简短文件中,并且限制每个容器最大为10GB.最初Docker仅能在支持Aufs文件系统的Linux发行版上运行,但是由于Aufs未能加入Linux内核,为了寻求兼容性.扩展性,Docker在内部通过g