1.环境准备
安装jdk需要(注意:jdk目录配置/usr/java下以免后期即使修改配置文件后jdk还是不正常)
安装mysql
CREATE DATABASE scm DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE amon DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE hue DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE hive DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
#mysql-connector-java-5.1.27-bin.jar拷贝到/usr/share/java路径下
mv mysql-connector-java-5.1.27-bin.jar mysql-connector-java.jar
2.CM服务安装&配置
2.1集群规划
节点 | node1 | node2 | node3 |
---|---|---|---|
服务 | cloudera-scm-server cloudera-scm-agent |
cloudera-scm-agent | cloudera-scm-agent |
2.1配置
#下载在线yum源配置文件(在线yum安装)
cd /etc/yum.repos.d
wget https://archive.cloudera.com/cm6/6.2.1/redhat7/yum/cloudera-manager.repo
xsync /etc/yum.repos.d/cloudera-manager.repo
tar -zxvf cloudera-repos.tar.gz -C /var/www/html
cd /var/www/html/
python -m SimpleHTTPServer 8900
#查看 node1:9000是否正常
vim /etc/yum.repos.d/cloudera-manager.repo
[cloudera-manager]
name=cloudera-manager
baseurl=http://node1:8900/cloudera-repos/cm6/6.2.1/redhat7/yum/
enabled=1
gpgcheck=0
#完成上面的文件分发
#node1执行
yum -y install cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server
#node2 &node3执行
yum -y install cloudera-manager-agent cloudera-manager-daemons
#修改cm配置文件中的server_host=node1,不要分发每台服务器手动修改
vim /etc/cloudera-scm-agent/config.ini
#初始化
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql scm root 123456
node1启动cm服务
systemctl start cloudera-scm-server
#node1,node2,node3启动agent
systemctl start cloudera-scm-agent
#启动日志有Started则启动成功
tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log