本文主要认真阐述在Cloudera Manager安装
-------------------------------分割线----------------------------------------------------------------------
1.下载CM6.1的安装包,地址为:
https://archive.cloudera.com/cm6/6.0.0/redhat7/yum/RPMS/x86_64/cloudera-manager-agent-6.0.0-530873.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.0.0/redhat7/yum/RPMS/x86_64/cloudera-manager-daemons-6.0.0-530873.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.0.0/redhat7/yum/RPMS/x86_64/cloudera-manager-server-6.0.0-530873.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.0.0/redhat7/yum/RPMS/x86_64/cloudera-manager-server-db-2-6.0.0-530873.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.0.0/redhat7/yum/RPMS/x86_64/oracle-j2sdk1.8-1.8.0+update141-1.x86_64.rpm
https://archive.cloudera.com/cm6/6.0.0/allkeys.asc
https://archive.cloudera.com/cdh6/6.0.0/parcels/
https://archive.cloudera.com/cdh6/6.0.0/parcels/CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel
https://archive.cloudera.com/cdh6/6.0.0/parcels/CDH-6.0.0-1.cdh6.0.0.p0.537114-el7.parcel.sha256
https://archive.cloudera.com/cdh6/6.0.0/parcels/manifest.json
mkdir /root/cdh6.0.0 把 CDH 6.0.0 的三个文件放到/root/cdh 6.0.0 中,并且注意把sha256后缀的文件名修改为sha
mkdir /root/cm6.0.0 把 Cloudera Manager 6.0.0 的5个文件放到/root/cm6.0.0 中
cdh6.1.0 和 cm6.1.0
mkdir /root/cdh6.1.0 把 CDH 6.1.0 的三个文件放到/root/cdh 6.1.0中,并且注意把sha256后缀的文件名修改为sha
mkdir /root/cm6.1.0 把 Cloudera Manager 6.1.0 的5个文件放到/root/cm6.1.0中
cd /root/cm6.1.0 或 cd /root/cm6.0.0
yum install createrepo
createrepo . (注意此命令的最后带一个点) 最终 cm6.0目录下多了一个repodata目录
将 cdh6.0目录 和 cm6.0目录 移动到/var/www/html目录下, 使得用户可以通过HTTP访问这些rpm包。
cd /root
mkdir -p /var/www/html
mv ./cdh6.1.0/ ./cm6.1.0/ /var/www/html 或 mv ./cdh6.0.0/ ./cm6.0.0/ /var/www/html
1.yum install httpd 安装httpd服务
2.systemctl start httpd 启动httpd服务
3.ps -ef | grep httpd 查看httpd服务是否启动
4.vim /etc/yum.repos.d/os.repo 以下为文件内容
[osrepo]
name=os_repo
baseurl=http://192.168.88.100/cm6.1.0 或 http://192.168.88.100/cm6.0.0
enabled=true
gpgcheck=false
5.sudo yum repolist
6.vim /etc/httpd/conf/httpd.conf
修改 /etc/httpd/conf/httpd.conf 配置文件,在中修改以下内容
把 AddType application/x-gzip .gz .tgz 第 284 行 修改为 AddType application/x-gzip .gz .tgz .parcel
7.重启httpd服务 systemctl restart httpd
8.浏览器即可打开以下链接:
http://192.168.88.100/cdh6.1.0/ 或 http://192.168.88.100/cdh6.0.0/
http://192.168.88.100/cm6.1.0/ 或 http://192.168.88.100/cm6.0.0/
1.vim /etc/yum.repos.d/cm.repo 以下为文件内容
[cmrepo]
name=cm_repo
baseurl=http://192.168.88.100/cm6.1.0 或 http://192.168.88.100/cm6.0.0
enable=true
gpgcheck=false
2.sudo yum repolist
3.重启httpd服务 systemctl restart httpd
--------------------------------分割线---------------------------------------------
1.第一种方式:(目前使用这种方式即可)
因为已经配置好repo仓库所以yum时会到192.168.88.100/cm6.0目录下找到oracle-j2sdk1.8-1.8.0+update141-1.x86_64.rpm进行安装
yum -y install oracle-j2sdk1.8-1.8.0+update141-1.x86_64
默认安装在 /usr/java/jdk1.8.0_141-cloudera
vim /etc/profile 文件中内容如下
JAVA_HOME=/usr/java/jdk1.8.0_141-cloudera
CLASSPATH=.:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
重新加载profile配置文件,让配置文件生效:source /etc/profile
检查是否已配置好新的JDK:
java -version
scp -r /etc/profile root@NODE2:/etc/
scp -r /etc/profile root@NODE3:/etc/
2.第二种方式
1.直接使用 rpm -ivh 命令安装 rpm 文件的方式
rpm -ivh oracle-j2sdk1.8-1.8.0+update141-1.x86_64.rpm
默认安装在 /usr/java/jdk1.8.0_141-cloudera
2.通过yum安装Cloudera Manager Server:(Cloudera Manager Server的源 已经配置到了repo库中)
yum -y install cloudera-manager-server
最后一行显示 Complete!
3.初始化数据库
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql cm cm password
最后一行显示 All done, your SCM database is configured correctly!
4.启动Cloudera Manager Server
必须保证MySQL启动了,才能正常启动Cloudera Manager Server:service mysql start
ps -ef | grep mysql
systemctl start cloudera-scm-server
启动Cloudera Manager Server
ps -ef | grep cloudera-scm-server
查看是否启动
systemctl status cloudera-scm-server
显示 Active: active (running)
5.检查端口是否监听
yum install net-tools
安装 netstat
netstat -lnpt | grep 7180
要等一段时间启动完全启动成功后,才能看到端口被使用,然后才能真正访问到CM的登录网页
显示
tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN 68289/java
5.通过 192.168.88.100:7180/cmf/login 访问 CM