Yum install a cluster-based CDH

First, prepare the environment

  Preparing at least three devices; CentOS7 system;

       If you are in the experimental environment, to the virtual machine's memory at least 4G, root recommendations 1T, data disk 1T, because it is a virtual machine, so the root partition and data disk to boldly; if it is in a production environment is the more the better; this time I the experimental environment is three 2G memory, 100G hard drive Tencent cloud host (CentOS7.5), I do not know if you can build a successful, try it;

Second, the database installation

  Since it is a key yum yum install it in the end;

       1、yum install mariadb mariadb-server -y

            

  2, start mariadb service, and boot from Kai

    systemctl start mariadb confirm that port 3306 has started

              systemctl enable mariadb

  3, change passwords and configure authorized users

    MariaDB [mysql]> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('123.com');

           MariaDB [(none)]> CREATE DATABASE scm DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ## scm database created and designated as the character set utf8mb4, collation is utf8mb4_unicode_ci, ci represents not case-sensitive;

              MariaDB [(none)]> CREATE USER 'scm'@'172.21.0.%' IDENTIFIED BY '123.com'; ## creates 'scm'@'172.21.0.%' user

              . MariaDB [(none)]> GRANT ALL PRIVILEGES ON scm * TO 'scm'@'172.21.0.%'; scm ownership authorization table in the user database to scm;

              MariaDB [(none)]> FLUSH PRIVILEGES; ## make the configuration take effect immediately;

  4, landing with a newly created user can test whether the normal use;

    (vir-3.5.2) [root@master ~]# mysql -uscm -h172.21.0.3 -p

    Enter password:
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 8
    Server version: 5.5.60-MariaDB MariaDB Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | scm |
    | test |
    +--------------------+
    3 rows in set (0.00 sec)

    MariaDB [(none)]> use scm;
    Database changed
    MariaDB [scm]> show tables;
    Empty set (0.00 sec)

Third, self image installation address

  Official mirror installation address ( https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.16.1/RPMS/x86_64/ ) due to the source in a foreign country, access will be very slow, so we can self-built source quick installation;

       1, install nginx as a web service and start

    yum install nginx -y

   2, create a profile

    [root@master conf.d]# cat /etc/nginx/conf.d/yum.conf

    {Server
    the listen 80;
    server_name www.zhide666.com;
    the root / Data / yum; gen # specified path
    autoindex on; # open directory browsing

              autoindex_exact_size off; # close the file size statistics in detail, so that the file size is displayed MB, GB units, the default is b

    autoindex_localtime on; # turn on the server to display the local time zone file modification date

    }

  3, create a local source CM, install yum source authoring tools

    yum install yum-utils createrepo yum-plugin-priorities -y

              

    Access renderings:

    

  4, download CDH version stored in the specified path

             

Fourth, configure yum to create their own source

  Official yum source: https: //archive.cloudera.com/cm5/redhat/7/x86_64/cm/cloudera-manager.repo

        Cm yum own source configuration, not only in its own configuration, but also to the self cm yum source configuration to the two other hosts ;

  [root@master yum.repos.d]# cat /etc/yum.repos.d/cloudera-manager.repo

  [cloudera-manager]
  baseurl=http://www.zhide666.com.cn/cm-5.16.1/
  gpgkey=http://www.zhide666.com.cn/cm-5.16.1/RPM-GPG-KEY-cloudera
  enable = 1
  gpgcheck = 1

       验证:

             

 五、安装Cloudera Manager Server端

   [root@master yum.repos.d]# yum install cloudera-manager-daemons cloudera-manager-server -y

六、各节点安装各个节点安装Cloudera Manager Agent端

  [root@master yum.repos.d]# yum install cloudera-manager-agent -y

  [root@node1 yum.repos.d]# yum install cloudera-manager-agent -y

  [root@node2 yum.repos.d]# yum install cloudera-manager-agent -y

 未完待续。。。。。。。。。

Guess you like

Origin www.cnblogs.com/zhangzhide/p/11094801.html