准备安装文件
- CDH-5.3.10-1.cdh5.3.10.p0.19-el6.parcel
- cloudera-manager-el6-cm5.1.3_x86_64.tar.gz
- jdk-7-linux-x64.rpm
安装JDK
查看现有版本java rpm -qa|grep java yum -y remove 卸载
rpm -ivh jdk-7-linux-x64.rpm
echo “JAVA_HOME=/usr/java/latest/” » /etc/environment
关闭防火墙、SELinux
关闭防火墙
service iptables stop (临时关闭)
chkconfig iptables off (重启后生效)
关闭SELinux
setenforce 0 (临时生效)
修改 /etc/selinux/config 下的 SELINUX=disabled (重启后永久生效)
host
cdh1/2/3
vi /etc/hosts
192.168.0.114 cdh1
192.168.0.115 cdh2
192.168.0.116 cdh3
无密码登录
cdh1
ssh-keygen -t rsa
ssh-copy-id root@cdh2
ssh-copy-id root@cdh3
cdh2
ssh-keygen -t rsa
ssh-copy-id root@cdh1
ssh-copy-id root@cdh3
cdh3
ssh-keygen -t rsa
ssh-copy-id root@cdh2
ssh-copy-id root@cdh1
ntp
所有节点安装ntp服务
yum install ntp
chkconfig ntpd on
cdh1
ntpdate -u 202.120.2.101
vi /etc/ntp.conf
vi /etc/ntp.conf
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
restrict default nomodify notrap
server 202.120.2.101 prefer #远程服务器地址
includefile /etc/ntp/crypto/pw
keys /etc/ntp/key
service ntpd restart
cdh2/cdh3
vi /etc/ntp.conf
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
restrict default kod nomodify notrap nopeernoquery
restrict -6 default kod nomodify notrapnopeer noquery
server cdh1
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
ntpdate -u cdh1 service ntpd restart
mysql
rpm -qa | grep musql |
rpm -e –nodes mysql***
yum install mysql-server
设置开机启动:chkconfig mysqld on
启动mysql:service mysqld start
设置root的初始密码:mysqladmin -u root password ‘root’
mysql -uroot -proot 进入mysql命令行,创建以下数据库(根据安装的服务有所区别,我装的是核心组件):
hive
create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
activity monitor
create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
hue
create database hue DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
授权root用户在主节点拥有所有数据库的访问权限
grant all privileges on . to ‘root’@’%’identified by ‘root’ with grant option;
flush privileges;
启动CM准备工作
创建用户 useradd –system –home=/opt/cm-5.1.3/run/cloudera-scm-server/ –no-create-home –shell=/bin/false cloudera-scm
tar xzvf cloudera-manager*.tar.gz
mysql-connector-java-5.1.33-bin.jar,放到/opt/cm-5.1.3/share/cmf/lib
初始化库 /opt/cm-5.3.10/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost -uroot -proot –scm-host localhost scm scm scm
修改agent配置 修改/opt/cm-5.3.10/etc/cloudera-scm-agent/config.ini中的server_host为主节点的主机名。
复制文件到cdh2/cdh3 scp -r /opt/cm-5.3.10 root@cdh2:/opt/ scp -r /opt/cm-5.3.10 root@cdh3:/opt/
的/opt/cloudera/parcel-repo/目录中(parcel-repo需要手动创建)。
相关的文件如下:
CDH-5.1.3-1.cdh5.1.3.p0.12-el6.parcel CDH-5.1.3-1.cdh5.1.3.p0.12-el6.parcel.sha manifest.json
启动服务 通过 /opt/cm-5.3.10/etc/init.d/cloudera-scm-server start 启动服务端。
通过 /opt/cm-5.3.10/etc/init.d/cloudera-scm-agent start 启动Agent服务。
端口7180,默认的用户名和密码均为admin
agent上缺少mysql驱动 /opt/cloudera/parcels/CDH-5.3.10-1.cdh5.3.10.p0.19/lib/hive/lib/
由于是最小化安装的centos ,python缺少依赖,报错注意看日志,缺什么加什么,少什么改什么。 yum install python-lxml
http://archive.cloudera.com/cm5/cm/5/
http://archive.cloudera.com/cdh5/parcels/latest/
参考
##