@awsekfozc
2019-01-21T17:33:16.000000Z
字数 3644
阅读 2762
CM
CM 5.x
bin文件:
http://archive.cloudera.com/cm5/installer/5.3.6/
rpm包
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5.3.6/RPMS/x86_64/
yum
http://archive.cloudera.com/cm5/repo-as-tarball/5.3.6/
parcels
http://archive.cloudera.com/cdh5/parcels/5.3.6/
CDH 5.x
http://archive.cloudera.com/cdh5/
包含大数据框架
- 系统盘 :RAID 1:系统映射到至少2个硬盘(fdisk -l)
- 数据盘 :JBOD,RAID 0
## 临时生效
# hostname bigdata-cdh61.lpg.com
## 永久生效
# vi /etc/sysconfig/network
# vi /etc/hosts
## 内容示例:BigData IP and HOSTNAME
192.168.1.61 bigdata-cdh61.lpg.com bigdata-cdh61
192.168.1.62 bigdata-cdh62.lpg.com bigdata-cdh62
192.168.1.63 bigdata-cdh63.lpg.com bigdata-cdh63
注意点:如果是客户端的机器,也需要配置映射.(C:\Windows\System32\drivers\etc\hosts)
##追加以下内容。
# 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
# adduser lpg
# passwd lpg
###普通用户的sudo权限
# /etc/sudoers
###写的权限
# chmod u+w /etc/sudoers
###添加
# vi /etc/sudoers
##内容:
lpg ALL=(root)NOPASSWD:ALL
###收回权限
# chmod u-w /etc/sudoers
###临时关闭
$ sudo service iptables stop
###永久关闭
$ sudo chkconfig iptables off
##centOS7
1、直接关闭防火墙
#关闭
systemctl stop firewalld
#永久关闭
systemctl disable firewalld
$ sudo vi /etc/sysconfig/selinux
##内容(重启机器才生效):
SELINUX=disabled
$ sudo rpm -qa|grep java
$ sudo rpm -e --nodeps xxx yyy zzz
##文件打开数目
$ ulimit -a
##用户最大进程数
$ ulimit -u
##设置
$ sudo vi /etc/security/limits.conf
###内容:
* soft nofile 32768
* hard nofile 1048576
* soft nproc 65536
* hard nproc unlimited
* soft memlock unlimited
* hard memlock unlimited
集群时间同步:找一台机器作为【时间服务器】bigdata-cdh61.lpg.com
$ sudo vi /etc/ntp.conf
###去掉注释,修改网段,下面修改的网段192.168.1.0,ifconfig查看
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
###注释
## server 0.centos.pool.ntp.org
## server 1.centos.pool.ntp.org
## server 2.centos.pool.ntp.org
###去掉注释
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
###启动ntpd
$ sudo service ntpd start
$ sudo chkconfig ntpd on
$ sudo service ntpd status
###客户端同步时间服务器
$ sudo ntpdate bigdata-cdh61.lpg.com
###客户端同步时间定时任务(which ntpdate查看命令完整目录)
$ sudo crontab -e
###内容
0-59/10 * * * * /usr/sbin/ntpdate bigdata-cdh61.lpg.com
##step 1
###启动HTTP服务(Apache服务)
$ sudo service httpd start
$ sudo chkconfig httpd on 永久生效
##step 2
##apache配置目录
##/var/www/html
$ cd /var/www/html
$ sudo mkdir -p cm-5.3.6
##step 3
$ su
# cd /root/softwares
# tar -zxf cm5.3.6-centos6.tar.gz
# cd /root/softwares/cm/5.3.6/RPMS/x86_64
# mv ./* /var/www/html/cm-5.3.6/
##step 4
$ cd /var/www/html/cm-5.3.6
$ sudo chown -R lpg:lpg ./*
##setp 1
# cd /root/softwares/repo-libs
# rpm -ivh ./*
##setp 2
$ cd /var/www/html/cm-5.3.6
$ sudo createrepo .
##setp 1
$ cd /etc/yum.repos.d/
$ sudo mkdir bak-repos ## 创建备份目录
$ sudo mv ./*.repo bak-repos/
##setp 2
$ sudo touch myrepo.repo
$ sudo vi myrepo.repo
###内容:
[myrepo]
name=myrepo
baseurl=http://bigdata-cdh61.lpg.com/cm-5.3.6/
enabled = 1
gpgcheck = 0
$ su
# cd /root/softwares/postgresq-libs
# chmod u+x ./*
# yum localinstall *.rpm
# cd /root/softwares/cm-5.3.6
# mv cloudera-manager-installer.bin ../
# cd /root/softwares
# chmod u+x cloudera-manager-installer.bin
# ./cloudera-manager-installer.bin --skip_repo_package=1
出错查看日志目录/var/log/cloudera-manager-installer,访问端口7180
过程:
1) 安装Cloudera Manager Agent
2) 从CMS下载cdh parcles包
3) 在各个主机上进行解压
##在集群所有机器上配置本地源
$ cd /etc/yum.repos.d/
$ sudo rm -rf ./*.repo
##在CM-Server机器上,进行SCP发送
# scp -r /etc/yum.repos.d/myrepo.repo bigdata-cdh62.lpg.com:/etc/yum.repos.d/
# scp -r /etc/yum.repos.d/myrepo.repo bigdata-cdh63.lpg.com:/etc/yum.repos.d/
# cd /root/softwares/cdh-5.3.6
# mv ./* /opt/cloudera/parcel-repo/
$ su lpg
$ cd /opt/cloudera/parcel-repo/
$ sudo mv CDH-5.3.6-1.cdh5.3.6.p0.11-el6.parcel.sha1 CDH-5.3.6-1.cdh5.3.6.p0.11-el6.parcel.sha
在此输入正文