環(huán)境情況
IP |
10.1.1.21 |
10.1.1.22 |
10.1.1.23 |
系統(tǒng) |
Centos 7.9 x64 |
Centos 7.9 x64 |
Centos 7.9 x64 |
HostName |
cdh01 |
cdh02 |
cdh03 |
內(nèi)存 |
24G |
8G |
8G |
硬盤 |
60G |
60G |
60G |
JDK |
1.8_271 |
1.8_271 |
1.8_271 |
MySQL |
5.7.31 |
- |
- |
CM |
6.3.1 |
6.3.1 |
6.3.1 |
Parcel |
6.3.2 |
6.3.2 |
6.3.2 |
軟件情況
基礎(chǔ)環(huán)境
三臺機(jī)都需要操作
# 臨時(shí)關(guān)閉
systemctl stop firewalld
# 永久關(guān)閉
systemctl disable firewalld
vim /etc/selinux/config
SELINUX=disabled
vim /etc/hosts
10.1.1.21 cdh01
10.1.1.22 cdh02
10.1.1.23 cdh03
vim /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
- NTP同步
- 第一臺機(jī)指向外網(wǎng)時(shí)間服務(wù)器,后續(xù)第二第三臺機(jī)指向第一臺機(jī)
yum -y install ntp
[root@cdh01 ~]# vim /etc/ntp.conf
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server ntp.aliyun.com
[root@cdh02 ~]# vim /etc/ntp.conf
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server cdh01
tar -zxvf jdk-8u271-linux-x64.tar.gz
ln -s jdk1.8.0_271 java
chown -R root.root jdk1.8.0_271
mkdir -p /usr/java
ln -s /usr/local/java default
mkdir -p /usr/share/java
mv mysql-connector-java-5.1.38.jar mysql-connector-java.jar
MySQL安裝
cdh01上安裝
[root@cdh01 ~]# tar -zxvf mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz -C /usr/local
[root@cdh01 ~]# cd /usr/local
[root@cdh01 local]# ln -s mysql-5.7.31-linux-glibc2.12-x86_64 mysql
[root@cdh01 local]# mkdir mysql/data
[root@cdh01 local]# useradd -s /sbin/nologin mysql
[root@cdh01 local]# chown -R mysql.mysql mysql*
[root@cdh01 local]# rm -fr /etc/my.cnf
[root@cdh01 local]# yum -y install libaio.so.1 libaio
[root@cdh01 local]# ./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[root@cdh01 local]# cp support-files/mysql.server /etc/init.d/mysqld
[root@cdh01 local]# chkconfig --add mysqld
[root@cdh01 local]# service mysqld restart
[root@cdh01 local]# mysql -u root -p
mysql> set password=password('password');
mysql> grant all privileges on *.* to 'root'@'%' identified by 'password';
mysql> flush privileges;
mysql> exit;
Httpd安裝
安裝完后把軟件拷貝到創(chuàng)建的目錄下,然后啟動httpd
[root@cdh01 ~]# yum -y install httpd
[root@cdh01 ~]# mkdir /var/www/html/parcel
[root@cdh01 ~]# cd /var/www/html/parcel
[root@cdh01 parcel]# mv CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha1 CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha
[root@cdh01 parcel]# systemctl start httpd
創(chuàng)建元數(shù)據(jù)庫
create database cmf default character set utf8;
create database amon default character set utf8;
grant all privileges on cmf.* to 'cmf'@'%' identified by 'password';
grant all privileges on amon.* to 'amon'@'%' identified by 'password';
安裝CM
cdh01中安裝
[root@cdh01 ~]# rpm -ivh --nodeps --force cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
[root@cdh01 ~]# rpm -ivh --nodeps --force cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm
修改數(shù)據(jù)庫連接信息
[root@cdh01 ~]# vim /etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=cdh01:3306
com.cloudera.cmf.db.name=cmf
com.cloudera.cmf.db.user=cmf
com.cloudera.cmf.db.password=password
com.cloudera.cmf.db.setupType=EXTERNAL
啟動并查看日志
[root@cdh01 ~]# systemctl start cloudera-scm-server
[root@cdh01 ~]# tail -F /var/log/cloudera-scm-server/cloudera-scm-server.log
打開界面后不管,繼續(xù)在三臺機(jī)上安裝agent
[root@cdh01 ~]# rpm -ivh --nodeps --force cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
[root@cdh01 ~]# vim /etc/cloudera-scm-agent/config.ini
server_host=cdh01
[root@cdh02 ~]# rpm -ivh --nodeps --force cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
[root@cdh02 ~]# rpm -ivh --nodeps --force cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
[root@cdh02 ~]# vim /etc/cloudera-scm-agent/config.ini
server_host=cdh01
[root@cdh03 ~]# rpm -ivh --nodeps --force cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
[root@cdh03 ~]# rpm -ivh --nodeps --force cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
[root@cdh03 ~]# vim /etc/cloudera-scm-agent/config.ini
server_host=cdh01
啟動所有agent
[root@cdh01 ~]# systemctl start cloudera-scm-agent
[root@cdh02 ~]# systemctl start cloudera-scm-agent
[root@cdh03 ~]# systemctl start cloudera-scm-agent
開始安裝軟件
完結(jié)
此次只安裝基本的組件,如果有需要的后面可以自行再添加組件即可.機(jī)器配置只做參考,可靈活變動.