在centos7.4环境下安装用cm5.16安装CDH
发表于:2025-01-22 作者:千家信息网编辑
千家信息网最后更新 2025年01月22日,修改ip 然后重启/etc/init.d/netwrok restartPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4
千家信息网最后更新 2025年01月22日在centos7.4环境下安装用cm5.16安装CDH
修改ip 然后重启/etc/init.d/netwrok restart
PROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=noIPV6_AUTOCONF=noIPV6_DEFROUTE=noIPV6_FAILURE_FATAL=noIPV6_ADDR_GEN_MODE=stable-privacyNAME=ens32UUID=a0ad438d-a586-4c30-b624-601b342a39c4DEVICE=ens32ONBOOT=yesNETMASK=255.255.255.0IPADDR=192.168.52.130GATEWAY=192.168.52.2DNS1=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.localdomain6192.168.52.130 bigdata-cdh01.kfk.com bigdata-cdh01192.168.52.131 bigdata-cdh02.kfk.com bigdata-cdj02192.168.52.132 bigdata-cdh03.kfk.com bigdata-cdh03
关闭防火墙
systemctl stop firewalld.servicesystemctl disable firewalld.service (开机不启动)systemctl status firewalld.service
禁用selinux cat /etc/sysconfig/selinux
SELINUX=disabled
临时关闭selinux
getenforcesetenforce 0getenforce
禁用ipv6
echo " " >> /etc/modprobe.d/dist.confecho "alias net-pf-10 off" >> /etc/modprobe.d/dist.confecho "alias ipv6 off" >> /etc/modprobe.d/dist.conf
卸载JDK
rpm -qa | grep javarpm -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 rsatouch authorized_keyschmod 600 authorized_keyscat id_rsa.pub > authorized_keysssh-copy-id -i id_rsa.pub root@192.168.52.130
使用ntp进行时间同步
主节点
driftfile /var/lib/ntp/driftrestrict 192.168.52.130 nomodify notrap nopeer noquery restrict 127.0.0.1restrict ::1restrict 192.168.52.2 mask 255.255.255.0 nomodify notrapserver 127.127.1.0Fudge 127.127.1.0 stratum 10includefile /etc/ntp/crypto/pwkeys /etc/ntp/keysdisable monitor
从节点,其他节点同理
driftfile /var/lib/ntp/driftrestrict 192.168.52.131 nomodify notrap nopeer noquery restrict 127.0.0.1restrict ::1restrict 192.168.52.2 mask 255.255.255.0 nomodify notrapserver 192.168.52.130Fudge 192.168.52.130 stratum 10includefile /etc/ntp/crypto/pwkeys /etc/ntp/keysdisable monitor
先关闭ntpd
ntpdate 192.168.52.130service ntpd restartsystemctl 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.rpmmount /dev/sr0 /mntln -s /mnt centos7/etc/yum.repos.d[Centos-7]name=myrepobaseurl=http://bigdata-cdh01/centos7/enabled=1gpgcheck=0yum clean allyum makecacheyum install -y createrepocd /var/www/html/cm-5.16createrepo .cat myrepo.repo[myrepo]name=myrepobaseurl=http://bigdata-cdh01/cm-5.16/enabled=1gpgcheck=0
安装mysql5.7数据库官网下载包(mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz)
groupadd mysqluseradd mysql -s /sbin/nologin -M -g mysqltar -zxvf mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz mv mysql-5.7.13-linux-glibc2.5-x86_64 /usr/local/mysqlchown mysql:mysql -R mysql/mkdir datachown -R mysql:mysql data/yum install -y perl-Data-Dumper.x86_64yum 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/mysqldvim /etc/init.d/mysqld basedir=/usr/local/mysqldatadir=/usr/local/mysql/dat编辑 /etc/my.cnf[mysqld]user=mysqldatadir=/usr/local/mysql/datasocket=/tmp/mysql.socklog-error=/usr/local/mysql/data/error.logpid-file=/usr/local/mysql/data/mysql/mysql.pidtmpdir=/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 oracleyum install -y oracle-j2sdk1.7.x86_64export JAVA_HOME=/usr/java/jdk1.7.0_67-clouderaexport JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=$JAVA_HOME/libexport 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.cdh6.16.2.p0.8-el7.parcel CDH-5.16.2-1.cdh6.16.2.p0.8-el7.parcel.sha1 manifest.jsonmv CDH-5.16.2-1.cdh6.16.2.p0.8-el7.parcel.sha1 CDH-5.16.2-1.cdh6.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.parcelKAFKA-3.1.1-1.3.1.1.p0.2-el7.parcel.shamanifest.json上传至 /opt/cloudera/parcel-repo上传KAFKA-1.2.0.jar 到 /opt/cloudera/csd
节点
数据
数据库
文件
用户
同步
最大
密码
数目
进程
主机
内存
命令
拷贝
用户名
进行时
防火墙
本机
服务
检查
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
阿里云服务器无法使用怎么解决
北上广软件开发工资水平
软件开发师哪里就业率高
服务器主板1155
什么是关系数据库的标准语言
黄石定制软件开发中心
网络安全特殊奖励政策
wcdma服务器
郑州网络安全周宣传活动方案
益阳软件开发培训在哪里
计算机网络技术专升本卷子
数据库设计过程中需求
齐心麦苗网络技术有限公司怎
海南省委网络安全员
怀旧服服务器内存清理
我的世界上最早的服务器
geem2数据库编辑教程
在软件开发模型中提出最早
经济数据库介绍讲座感想
冀州市网络安全宣传
川渝网络安全
数码方块软件开发上海
db是在数据库中什么意思
科技创新与互联网经济方向
局域网服务器需要设置dns吗
68聊天软件开发者
网络技术和数据分析
王者荣耀查询登录过服务器
山东软件开发公司名单
天河正规的网络数据库维护