1、修改主机名
hostnamectl set-hostname n68
2、开启ntpd 自动同步时间,并加入开机启动
systemctl status ntpd \
&& systemctl start ntpd \
&& systemctl enable ntpd \
&& systemctl status ntpd
3、下载Cloudera-Manager安装包,到/data/src/cm-6.3/cloudera-repos/ 文件夹下
下载地址:https://archive.cloudera.com/cm6/6.3.0/(不同版本,不同路径)
下载一:https://archive.cloudera.com/cm6/6.3.0/allkeys.asc
下载二:https://archive.cloudera.com/cm6/6.3.0/redhat7/yum/RPMS/x86_64/ 此地址下的所有文件,如下
4、创建本地yum源
安装apache(在CentOS系统里,是httpd),并启动,加入开机启动
yum -y install httpd createrepo \
&& systemctl start httpd \
&& systemctl enable httpd
验证访问:http://IP:80/
拷贝刚下载的rpm文件到apache下
cd 到/var/www/html/ 目录下(apache的默认文件目录)
createrepo /data/src/cm-6.3/cloudera-repos/ \
&& cp -r /data/src/cm-6.3/cloudera-repos /var/www/html/
验证:http://IP/cloudera-repos/
5 安装JDK
[root@n68 cm-6.3]# cd /var/www/html/cloudera-repos/
[root@n68 cloudera-repos]# rpm -ivh oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm
warning: oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID b0b19c9f: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:oracle-j2sdk1.8-1.8.0+update181-1################################# [100%]
6、安装mysql, 并初始化MySQL数据库
安装文档:https://www.cnblogs.com/luohanguo/p/9045391.html
初始化数据,执行以下命令
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 rman DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE hue DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE metastore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE sentry DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE nav DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE navms DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE oozie DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON scm.* TO 'scm'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON amon.* TO 'amon'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON rman.* TO 'rman'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON hue.* TO 'hue'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON metastore.* TO 'hive'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON sentry.* TO 'sentry'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON nav.* TO 'nav'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON navms.* TO 'navms'@'%' IDENTIFIED BY 'mypass7789';
GRANT ALL ON oozie.* TO 'oozie'@'%' IDENTIFIED BY 'mypass7789';
SHOW DATABASES;
7、配置mysql jdbc驱动
cd /data/src/mysql-jdbc/
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.48.tar.gz
tar -zxvf mysql-connector-java-5.1.48.tar.gz
cp mysql-connector-java-5.1.48/mysql-connector-java-5.1.48.jar /usr/share/java/mysql-connector-java.jar
8、安装Cloudera Manager
配置 cloudera-manager 本地yum源
(
cat <> /etc/yum.repos.d/cloudera-manager.repo \
&& yum clean all \
&& yum makecache
执行:
sudo yum install -y cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server
安装成功以后,在自动生成/opt/cloudera
9、下载并配置Parcel包,并放入/opt/cloudera/parcel-repo目录下
下载文件一:https://archive.cloudera.com/cdh6/6.3.0/parcels/CDH-6.3.0-1.cdh6.3.0.p0.1279813-el7.parcel
下载文件二:https://archive.cloudera.com/cdh6/6.3.0/parcels/manifest.json
授予权限给cloudera-scm用户
cd /opt/cloudera/parcel-repo
sha1sum CDH-6.3.0-1.cdh6.3.0.p0.1279813-el7.parcel| awk '{ print $1 }' >CDH-6.3.0-1.cdh6.3.0.p0.1279813-el7.parcel.sha
chown -R cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo/*
10、初始化scm库
执行:
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql scm scm mypass7789
结果:
JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing: /usr/java/jdk1.8.0_181-cloudera/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/opt/cloudera/cm/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
Wed Aug 14 11:39:18 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
[main] DbCommandExecutor INFO Successfully connected to database.
All done, your SCM database is configured correctly!
11、启动cloudera服务
systemctl start cloudera-scm-server
查看日志
tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log
执行结果:成功
2019-08-14 11:42:34,191 INFO WebServerImpl:com.cloudera.server.cmf.WebServerImpl: Started Jetty server.
查到日志出现这句话,就可以浏览器访问CM了,默认用户名密码:admin/admin,http://IP:7180
此文感谢:
https://blog.csdn.net/qq_39680564/article/details/99479703#212_JDK_184