本文檔描述CENTOS7.2操做系統部署CDH企業版的過程。Cloudera企業級數據中心的安裝主要分爲4個步驟:html
1.集羣服務器配置,包括安裝操做系統、關閉防火牆、同步服務器時鐘等;java
2.外部數據庫安裝node
3.安裝Cloudera管理器;mysql
4.安裝CDH集羣;linux
這篇文檔將着重介紹Cloudera管理器與CDH的安裝,並基於如下假設:sql
5.採用ec2-user對集羣進行部署shell
6.您已經下載CDH和CM的安裝包數據庫
集羣中各個節點之間能互相通訊使用靜態IP地址。IP地址和主機名經過/etc/hosts配置,主機名/etc/hostname進行配置。apache
以cm節點(172.31.2.159)爲例:centos
/etc/hostname文件以下:
| ip-172-31-2-159 |
|:----|
或者你能夠經過命令修改當即生效
| ec2-user@ip-172-31-2-159 ~$ sudo hostnamectl set-hostname ip-172-31-2-159 |
|:----|
注意:這裏修改hostname跟REDHAT6的區別
/etc/hosts文件以下:
| 172.31.2.159 ip-172-31-2-159172.31.12.108 ip-172-31-12-108172.31.5.236 ip-172-31-5-236172.31.7.96 ip-172-31-7-96 |
|:----|
以上兩步操做,在集羣中其它節點作相應配置。
在全部節點執行sudo setenforce 0 命令,此處使用批處理shell執行:
| ec2-user@ip-172-31-2-159 ~$ sh ssh_do_all.sh node.list "sudo setenforce 0" |
|:----|
集羣全部節點修改/etc/selinux/config文件以下:
| SELINUX=disabledSELINUXTYPE=targeted |
|:----|
集羣全部節點執行 sudo systemctl stop命令,此處經過shell批量執行命令以下:
在CentOS7.2的操做系統上,已經默認的安裝了chrony,配置chrony時鐘同步,將cm(172.31.2.159)服務做爲本地chrony服務器,其它3臺服務器與其保持同步,配置片斷:
| ec2-user@ip-172-31-2-159 ~$ sh ssh_do_all.sh node.list "sudo systemctl restart chronyd" |
|:----|
| ec2-user@ip-172-31-2-159 ~$ sh ssh_do_all.sh node.list "chronyc sources" |
|:----|
| ec2-user@ip-172-31-2-159 ~$ sudo yum -y install httpd |
|:----|
| ec2-user@ip-172-31-2-159 ~$ sudo systemctl start httpdec2-user@ip-172-31-2-159 ~$ sudo systemctl stop httpd |
|:----|
MariaDB-10.2.1-centos7-x86\_64-client.rpm
MariaDB-10.2.1-centos7-x86\_64-common.rpm
MariaDB-10.2.1-centos7-x86\_64-compat.rpm
MariaDB-10.2.1-centos7-x86\_64-server.rpm
將包下載到本地,放在同一目錄,執行createrepo命令生成rpm元數據。
此處使用apache2,將上述mariadb10.2.1目錄移動到/var/www/html目錄下, 使得用戶能夠經過HTTP訪問這些rpm包。
[ec2-user@ip-172-31-2-159 ~]$ sudo systemctl start mariadb [ec2-user@ip-172-31-2-159 ~]$ sudo /usr/bin/mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] Y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created fo them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] Y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] n ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] Y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so fa will take effect immediately. Reload privilege tables now? [Y/n] Y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
將Cloudera Manager安裝須要的7個rpm包下載到本地,放在同一目錄,執行createrepo命令生成rpm元數據。
此處使用apache2,將上述cdh5.10.0/cm5.10.0目錄移動到/var/www/html目錄下, 使得用戶能夠經過HTTP訪問這些rpm包。
| ec2-user@ip-172-31-2-159 ~$ sudo mv cdh5.10.0/ cm5.10.0/ /var/www/html/ |
|:----|
| ec2-user@ip-172-31-2-159 ~$ sudo yum -y install cloudera-manager-server |
|:----|
| ec2-user@ip-172-31-2-159 ~$ sudo systemctl start cloudera-scm-server |
|:----|
| ec2-user@ip-172-31-2-159 ~$ sudo netstat -lnpt | grep 7180tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN 6890/java |
|:----|
3.選擇60試用,點擊繼續
4.點擊「繼續」
5.輸入主機ip或者名稱,點擊搜索找到主機後點擊繼續
6.點擊「繼續」
7.使用parcel選擇,點擊「更多選項」,點擊「-」刪除其它全部地址,輸入
http://172.31.2.159/cm5.10.0/點擊「保存更改」
8.選擇自定義存儲庫,輸入cm的http地址
9.點擊「繼續」,進入下一步安裝jdk
10.點擊「繼續」,進入下一步,默認多用戶模式
11.點擊「繼續」,進入下一步配置ssh帳號密碼
12.點擊「繼續」,進入下一步,安裝Cloudera Manager相關到各個節點
13.點擊「繼續」,進入下一步安裝cdh到各個節點
14.點擊「繼續」,進入下一步主機檢查,確保全部檢查項均經過
點擊完成進入服務安裝嚮導。
2.點擊「繼續」,進入集羣角色分配
3.點擊「繼續」,進入下一步,測試數據庫鏈接
4.測試成功,點擊「繼續」,進入目錄設置,此處使用默認默認目錄,根據實際狀況進行目錄修改
5.點擊「繼續」,進入各個服務啓動
6.安裝成功
7.安裝成功後進入home管理界面
「醉酒鞭名馬,少年多浮誇! 嶺南浣溪沙,嘔吐酒肆下!摯友不願放,數據玩的花!」