首页 > 代码库 > Cloudera-manager-installaction
Cloudera-manager-installaction
1、基本环境准备
[hadoop@hadoop html]$ sudo chkconfig iptables off 禁用防火墙
[hadoop@hadoop html]$ vi /etc/selinux/config禁用selinux,SELINUX=disabled
注:保存重启系统
2、Cloudera Manager的离线安装包下载,构建CM本地源
[hadoop@hadoop html]$ pwd
/var/www/html
[hadoop@hadoop html]$ tree
-- cm5
`-- redhat
`-- 6
`-- x86_64
`-- cm
|-- 5
| |-- mirrors
| |-- repodata
| | |-- filelists.xml.gz
| | |-- filelists.xml.gz.asc
| | |-- other.xml.gz
| | |-- other.xml.gz.asc
| | |-- primary.xml.gz
| | |-- primary.xml.gz.asc
| | |-- repomd.xml
| | `-- repomd.xml.asc
| `-- RPMS
| |-- noarch
| `-- x86_64
| |-- cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- cloudera-manager-daemons-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- cloudera-manager-server-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- cloudera-manager-server-db-2-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- enterprise-debuginfo-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- jdk-6u31-linux-amd64.rpm
| `-- oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
|-- cloudera-manager.repo
`-- RPM-GPG-KEY-cloudera
10 directories, 18 files
说明:要在生产系统部署CDH,先要实现Cloudera Manager的离线安装,安装好Cloudera Manager后,还要通过Cloudera Manager执行CDH的离线安装两个步骤。由于生产环境的封闭性以及国内网络环境,这些离线包很难从Cloudera的官方网站下载,所以需要将Cloudera的官方网站下载地址映射到本地IP。
3、配置一个http服务
[hadoop@hadoop html]$ sudo /etc/init.d/httpd start启动httpd服务
[hadoop@hadoop html]$ chkconfig --list httpd 检查httpd服务开机启动情况
[hadoop@hadoop html]$ ps -ef|grep apache查看此服务是否启动
注:我们把CM安装需要的包都放到这个服务目录下面了。
4、配置本地映射ip到这个httpd服务
[hadoop@hadoop html]$ cat /etc/hosts
192.168.2.200 server1
192.168.2.201 server2
192.168.2.202 server3
192.168.2.203 server4
192.168.2.124 archive.cloudera.com
192.168.2.124 archive-primary.cloudera.com
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/ 在本地机器输入这个地址能访问到你搭建的这个本地源库
注:注意映射地址是在所有要按照cdh的机器上配置,如果要验证是否大家离线源成功,请在windows本地hosts文件映射安装源地址,浏览器地址即可验证。
5、CDH和Impala的离线安装包下载
[hadoop@hadoop html]$ sudo mkdir cdh5/parcels/latest -p建立源目录
[hadoop@hadoop html]$ tree /var/www/html/
/var/www/html/
|-- cdh5
| `-- parcels
| `-- latest
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-el5.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-el6.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-precise.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-sles11.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-trusty.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-wheezy.parcel
| `-- manifest.json
`-- cm5
`-- redhat
`-- 6
`-- x86_64
`-- cm
|-- 5
| |-- RPMS
| | |-- noarch
| | `-- x86_64
| | |-- cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- cloudera-manager-daemons-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- cloudera-manager-server-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- cloudera-manager-server-db-2-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- enterprise-debuginfo-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- jdk-6u31-linux-amd64.rpm
| | `-- oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
| |-- mirrors
| `-- repodata
| |-- filelists.xml.gz
| |-- filelists.xml.gz.asc
| |-- other.xml.gz
| |-- other.xml.gz.asc
| |-- primary.xml.gz
| |-- primary.xml.gz.asc
| |-- repomd.xml
| `-- repomd.xml.asc
|-- RPM-GPG-KEY-cloudera
`-- cloudera-manager.repo
6、安装要的软件
115 rpm -qa | grep mysql 检查是否安装mysql
117 rpm -e mysql-libs-5.1.71-1.el6.x86_64 卸载
118 rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps 强制卸载
119 rpm -qa | grep mysql 检查是否卸载
120 rpm -i MySQL-server-5.5.40-1.linux2.6.x86_64.rpm 安装mysql
121 mysqld_safe & 启动mysql服务端
122 rpm -i MySQL-client-5.5.40-1.linux2.6.x86_64.rpm 安装客户端
123 mysql_secure_installation 修改密码以及初始化信息
124 mysql -uroot -padmin 登录
126 tar -zxvf jdk-7u45-linux-x64.tar.gz -C ../ 安装jdk
143 chmod u+x cloudera-manager-installer.bin 修改权限为可执行
145 ./cloudera-manager-installer.bin 安装CM
[root@server1 installpackage]# cat /var/log/cloudera-manager-installer/4.install-cloudera-manager-server-db-2.log
安装报错:Error: Package: cloudera-manager-server-db-2-5.0.0-1.cm500.p0.215.el6.x86_64 (cloudera-manager)
Requires: postgresql-server >= 8.4
解决方法:手动下载rpm文件并按顺序逐个安装,因为CM依赖于postgresql数据库。
rpm -ivh postgresql-libs-8.4.20-1.el6_5.x86_64.rpm
rpm -ivh postgresql-8.4.20-1.el6_5.x86_64.rpm
rpm -ivh postgresql-server-8.4.20-1.el6_5.x86_64.rpm
[root@server1 installpackage]# ./cloudera-manager-installer.bin 再次安装,即可成功
[root@server1 installpackage]# netstat -an | grep 7180 查看7180端口是否起来
tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN
tcp 0 0 135.32.43.192:7180 135.32.43.209:63901 TIME_WAIT
tcp 0 0 135.32.43.192:7180 135.32.43.209:63902 TIME_WAIT
tcp 0 0 135.32.43.192:7180 135.32.43.209:63899 TIME_WAIT
tcp 0 0 135.32.43.192:7180 135.32.43.209:63895 TIME_WAIT
7、安装CM过程报错
--> Finished Dependency Resolution
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: fuse-libs
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: redhat-lsb
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: cyrus-sasl-gssapi
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: portmap
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: fuse
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
END (1)
remote package cloudera-manager-agent could not be installed, giving up waiting for rollback request
换为国内源,安装 sudo yum install redhat-lsb -y, sudo yum install -y cyrus-sasl-gssapi portmap,sudo yum install fuse-libs fuse
$ vi /etc/yum.repos.d/163.repo #如果没有这个文件,新建一个,切记:$releasever被修改为了6
[base]
name=CentOS-$releasever - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
enabled=1
gpgcheck=0
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
enabled=1
gpgcheck=0
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
enabled=1
gpgcheck=0
[root@server2 yum.repos.d]# yum clean all
[root@server2 yum.repos.d]# yum makecache #生成缓存
[root@server2 yum.repos.d]# yum install redhat-lsb cyrus-sasl-gssapi portmap fuse-libs fuse -y
至此,CM离线安装已完成!
注意:如果你和我一样是用笔记本虚拟机搭建,可能会出现内存不够,导致CM挂掉情况请重启CM服务,/etc/init.d/cloudera-scm-server start,/etc/init.d/cloudera-scm-agent start,不得不赞叹,cloudera的强大,你启动CM服务后,文件继续断点开始分发!而不用重新开始。
8、在CM界面添加各种hadoop组件
注意:如果组件还是离线,请把cloudera相关项目源目录结构以及rpm包安装之前CM安装制作本地源方式存放rpm包,在这里才能成功安装组件!
[hadoop@hadoop html]$ sudo chkconfig iptables off 禁用防火墙
[hadoop@hadoop html]$ vi /etc/selinux/config禁用selinux,SELINUX=disabled
注:保存重启系统
2、Cloudera Manager的离线安装包下载,构建CM本地源
[hadoop@hadoop html]$ pwd
/var/www/html
[hadoop@hadoop html]$ tree
-- cm5
`-- redhat
`-- 6
`-- x86_64
`-- cm
|-- 5
| |-- mirrors
| |-- repodata
| | |-- filelists.xml.gz
| | |-- filelists.xml.gz.asc
| | |-- other.xml.gz
| | |-- other.xml.gz.asc
| | |-- primary.xml.gz
| | |-- primary.xml.gz.asc
| | |-- repomd.xml
| | `-- repomd.xml.asc
| `-- RPMS
| |-- noarch
| `-- x86_64
| |-- cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- cloudera-manager-daemons-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- cloudera-manager-server-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- cloudera-manager-server-db-2-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- enterprise-debuginfo-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| |-- jdk-6u31-linux-amd64.rpm
| `-- oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
|-- cloudera-manager.repo
`-- RPM-GPG-KEY-cloudera
10 directories, 18 files
说明:要在生产系统部署CDH,先要实现Cloudera Manager的离线安装,安装好Cloudera Manager后,还要通过Cloudera Manager执行CDH的离线安装两个步骤。由于生产环境的封闭性以及国内网络环境,这些离线包很难从Cloudera的官方网站下载,所以需要将Cloudera的官方网站下载地址映射到本地IP。
3、配置一个http服务
[hadoop@hadoop html]$ sudo /etc/init.d/httpd start启动httpd服务
[hadoop@hadoop html]$ chkconfig --list httpd 检查httpd服务开机启动情况
[hadoop@hadoop html]$ ps -ef|grep apache查看此服务是否启动
注:我们把CM安装需要的包都放到这个服务目录下面了。
4、配置本地映射ip到这个httpd服务
[hadoop@hadoop html]$ cat /etc/hosts
192.168.2.200 server1
192.168.2.201 server2
192.168.2.202 server3
192.168.2.203 server4
192.168.2.124 archive.cloudera.com
192.168.2.124 archive-primary.cloudera.com
http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/ 在本地机器输入这个地址能访问到你搭建的这个本地源库
注:注意映射地址是在所有要按照cdh的机器上配置,如果要验证是否大家离线源成功,请在windows本地hosts文件映射安装源地址,浏览器地址即可验证。
5、CDH和Impala的离线安装包下载
[hadoop@hadoop html]$ sudo mkdir cdh5/parcels/latest -p建立源目录
[hadoop@hadoop html]$ tree /var/www/html/
/var/www/html/
|-- cdh5
| `-- parcels
| `-- latest
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-el5.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-el6.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-precise.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-sles11.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-trusty.parcel
| |-- CDH-5.3.0-1.cdh5.3.0.p0.30-wheezy.parcel
| `-- manifest.json
`-- cm5
`-- redhat
`-- 6
`-- x86_64
`-- cm
|-- 5
| |-- RPMS
| | |-- noarch
| | `-- x86_64
| | |-- cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- cloudera-manager-daemons-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- cloudera-manager-server-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- cloudera-manager-server-db-2-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- enterprise-debuginfo-5.3.0-1.cm530.p0.166.el6.x86_64.rpm
| | |-- jdk-6u31-linux-amd64.rpm
| | `-- oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
| |-- mirrors
| `-- repodata
| |-- filelists.xml.gz
| |-- filelists.xml.gz.asc
| |-- other.xml.gz
| |-- other.xml.gz.asc
| |-- primary.xml.gz
| |-- primary.xml.gz.asc
| |-- repomd.xml
| `-- repomd.xml.asc
|-- RPM-GPG-KEY-cloudera
`-- cloudera-manager.repo
6、安装要的软件
115 rpm -qa | grep mysql 检查是否安装mysql
117 rpm -e mysql-libs-5.1.71-1.el6.x86_64 卸载
118 rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps 强制卸载
119 rpm -qa | grep mysql 检查是否卸载
120 rpm -i MySQL-server-5.5.40-1.linux2.6.x86_64.rpm 安装mysql
121 mysqld_safe & 启动mysql服务端
122 rpm -i MySQL-client-5.5.40-1.linux2.6.x86_64.rpm 安装客户端
123 mysql_secure_installation 修改密码以及初始化信息
124 mysql -uroot -padmin 登录
126 tar -zxvf jdk-7u45-linux-x64.tar.gz -C ../ 安装jdk
143 chmod u+x cloudera-manager-installer.bin 修改权限为可执行
145 ./cloudera-manager-installer.bin 安装CM
[root@server1 installpackage]# cat /var/log/cloudera-manager-installer/4.install-cloudera-manager-server-db-2.log
安装报错:Error: Package: cloudera-manager-server-db-2-5.0.0-1.cm500.p0.215.el6.x86_64 (cloudera-manager)
Requires: postgresql-server >= 8.4
解决方法:手动下载rpm文件并按顺序逐个安装,因为CM依赖于postgresql数据库。
rpm -ivh postgresql-libs-8.4.20-1.el6_5.x86_64.rpm
rpm -ivh postgresql-8.4.20-1.el6_5.x86_64.rpm
rpm -ivh postgresql-server-8.4.20-1.el6_5.x86_64.rpm
[root@server1 installpackage]# ./cloudera-manager-installer.bin 再次安装,即可成功
[root@server1 installpackage]# netstat -an | grep 7180 查看7180端口是否起来
tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN
tcp 0 0 135.32.43.192:7180 135.32.43.209:63901 TIME_WAIT
tcp 0 0 135.32.43.192:7180 135.32.43.209:63902 TIME_WAIT
tcp 0 0 135.32.43.192:7180 135.32.43.209:63899 TIME_WAIT
tcp 0 0 135.32.43.192:7180 135.32.43.209:63895 TIME_WAIT
7、安装CM过程报错
--> Finished Dependency Resolution
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: fuse-libs
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: redhat-lsb
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: cyrus-sasl-gssapi
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: portmap
Error: Package: cloudera-manager-agent-5.3.0-1.cm530.p0.166.el6.x86_64 (cloudera-manager)
Requires: fuse
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
END (1)
remote package cloudera-manager-agent could not be installed, giving up waiting for rollback request
换为国内源,安装 sudo yum install redhat-lsb -y, sudo yum install -y cyrus-sasl-gssapi portmap,sudo yum install fuse-libs fuse
$ vi /etc/yum.repos.d/163.repo #如果没有这个文件,新建一个,切记:$releasever被修改为了6
[base]
name=CentOS-$releasever - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
enabled=1
gpgcheck=0
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
enabled=1
gpgcheck=0
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
enabled=1
gpgcheck=0
[root@server2 yum.repos.d]# yum clean all
[root@server2 yum.repos.d]# yum makecache #生成缓存
[root@server2 yum.repos.d]# yum install redhat-lsb cyrus-sasl-gssapi portmap fuse-libs fuse -y
至此,CM离线安装已完成!
注意:如果你和我一样是用笔记本虚拟机搭建,可能会出现内存不够,导致CM挂掉情况请重启CM服务,/etc/init.d/cloudera-scm-server start,/etc/init.d/cloudera-scm-agent start,不得不赞叹,cloudera的强大,你启动CM服务后,文件继续断点开始分发!而不用重新开始。
8、在CM界面添加各种hadoop组件
注意:如果组件还是离线,请把cloudera相关项目源目录结构以及rpm包安装之前CM安装制作本地源方式存放rpm包,在这里才能成功安装组件!
Cloudera-manager-installaction
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。