CM安装指南(Centos)
Posted wingooom
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CM安装指南(Centos)相关的知识,希望对你有一定的参考价值。
源包下载安装
$ wget http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
$ chmod u+x cloudera-manager-installer.bin
$ sudo ./cloudera-manager-installer.bin
若能成功安装,则可访问页面:http:.//IP:7180。
默认登录账号:admin。密码:admin
结束。
否则继续阅读。
关闭selinux
查看SELinux状态:
/usr/sbin/sestatus -v
所有主机均需关闭SELinux:
# vim /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可
reboot
修改为外部数据库
0、关闭cloudera-scm-server和cloudera-scm-server-db
# service cloudera-scm-server stop
# service cloudera-scm-server-db stop
1、修改db.properties
# vim /etc/cloudera-scm-server/db.properties
//注释掉原来的
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=localhost:3306
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=root
com.cloudera.cmf.db.password=123456
com.cloudera.cmf.db.setupType=EXTERNA
2、在数据库中,创建数据库scm。
3、启动cm
# service cloudera-scm-server start
注意不用再启动cloudera-scm-server-db。
配置mysql-connector
cp mysql-connector-java-5.1.27.jar /usr/share/java/mysql-connector-java
cp mysql-connector-java-5.1.27.jar /usr/share/cmf/lib/mysql-connector-java
yum配置
yum.conf
/etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
# 若安装了deltarpm,但是报错no presto metadata available for cloudera-manager。则添加下面的一行。
deltarpm=0
yum.repo.d
yum的配置源文件目录。
/etc/yum.repo.d/
当在执行yum命令时,若报错,
- 在此目录中,找到相应源的配置文件,将enabled=0;
- 检查相应源文件的配置是否正确(baseurlurl是否正确)
- 检查相应的源是否好使,考虑是否更换源。
添加 cloudera-manager 源
查看系统版本
$ uname -a
Linux HadoopM 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
这里对应的版本是el7。
cd /etc/yum.repos.d
wget http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/cloudera-manager.repo
vim cloudera-manager.repo
# 修改该文件内容
[cloudera-manager]
name=Cloudera Manager
baseurl=http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.9.0/
gpgkey = http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/RPM-GPG-KEY-cloudera
gpgcheck=0
enabled=1
添加 cloudera-cdh5 源
cd /etc/yum.repos.d
wget http://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/cloudera-cdh5.repo
vim cloudera-cdh5.repo
# 修改该文件内容
[cloudera-cdh5]
# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 7 x86_64
name=Cloudera's Distribution for Hadoop, Version 5
baseurl=https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5.9.0/
gpgkey =https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/RPM-GPG-KEY-cloudera
gpgcheck = 0
enabled = 1
yum安装插件
yum install deltarpm
更新源
yum update
清空缓存
yum clean all
yum makecache
默认安装目录
1、日志文件位置
安装时日志文件目录:
/var/log/cloudera-manager-installer/
启动时日志文件目录:
/var/log/cloudera-scm-server/
启动脚本
/etc/rc.d/init.d/cloudera-scm-server
/etc/rc.d/init.d/cloudera-scm-server-db
数据库配置文件
/etc/cloudera-scm-server
cmf目录及卸载
/usr/share/cmf
/usr/share/cmf/uninstall-cloudera-manager.sh
其他文件
/usr/sbin/cmf-server
/run/cloudera-scm-server
/etc/default/cloudera-scm-server
启动脚本配置
vim /etc/rc.d/init.d/cloudera-scm-server
#修改用户
#USER=cloudera-scm
#GROUP=cloudera-scm
USER=root
GROUP=root
#修改java参数
#MAX_PERMGEN=256
#MAX_HEAP=2048
MAX_PERMGEN=1024
MAX_HEAP=2048
修改java参数配置
$ vim /etc/default/cloudera-scm-server
关闭防火墙
systemctl stop iptables
systemctl stop firewalld
service iptables stop
service firewalld stop
启动脚本程序
方法一:
$ cd //etc/rc.d/init.d
$ ./cloudera-scm-server-db start
$ ./ start
方法二:
$ systemctl start cloudera-scm-server-db
$ systemctl stop cloudera-scm-server
yum离线安装rpm包命令:
yum localinstall –nogpgcheck
以上是关于CM安装指南(Centos)的主要内容,如果未能解决你的问题,请参考以下文章