其實,基本思路跟以下差很少,我就很少詳細說了,貼出主要圖。html
博主,我是直接借鑑下面這位博主,來進行安裝的!(灰常感謝他們!)java
在線和離線安裝Cloudera CDH 5.6.0mysql
Cloudera Manager 5和CDH5離線安裝jquery
https://www.zybuluo.com/ncepuwanghui/note/474966linux
ClouderManager官網git
https://www.cloudera.com/documentation/manager/5-1-x/Cloudera-Manager-Installation-Guide/cm5ig_mysql.html#id_trn_pps_xm_unique_1
說在前面的話sql
個人機器是總共4臺,分別爲ubuntucmbigdata一、ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4。數據庫
在ubuntucmbigdata1上執行了bootstrap
sudo apt-get install cloudera-manager-daemons cloudera-manager-server sudo apt-get install cloudera-manager-daemons cloudera-manager-agent
即,ubuntucmbigdata1是既作server,又作agent。ubuntu
在ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4上執行了
sudo apt-get install cloudera-manager-daemons cloudera-manager-agent
即,ubuntucmbigdata二、三、和4是隻作agent。
在ubuntucmbigdata一、ubuntucmbigdata二、ubuntucmbigdata三、ubuntucmbigdata4上
新建文件sudo vi /etc/apt/sources.list.d/cloudera-manager.list
,複製如下內容到cloudera.list裏
# Packages for Cloudera Manager, Version 5, on Ubuntu 14.04 x86_64 deb [arch=amd64] http://archive.cloudera.com/cm5/ubuntu/trusty/amd64/cm trusty-cm5 contrib deb-src http://archive.cloudera.com/cm5/ubuntu/trusty/amd64/cm trusty-cm5 contrib
而且在在ubuntucmbigdata一、ubuntucmbigdata二、ubuntucmbigdata三、ubuntucmbigdata4上
向apt添加cloudera源公鑰,在全部節點執行以下命令:
curl -s http://archive.cloudera.com/cm5/ubuntu/trusty/amd64/cm/archive.key | sudo apt-key add -
而後,再
sudo apt-get update
具體在後面我會詳細教你們怎麼安裝。
的確,我也跟這位博主同樣,也須要在實驗室裏部署。以及也是4臺機器。(至於緣由,你們都懂得,中國高校研究生喜歡四、三、二、1來進行加速比作實驗論文)
在實驗室安裝過社區版的Hadoop,當時用的是普通PC機,安裝的過程遇到了好多問題。當解決了大部分的安裝問題以後因爲實驗室的需求,須要安裝一個商業發行版的hadoop ,咱們就採用的Cloudera 公司發行的版本。首先要說明的是CDH對內存要求比較高,當咱們採用原來的4G內存的PC機,只要啓動基本內存就滿了,而且會拖慢整個集羣的運算速度。因此說安裝CDH對硬件的要求比較高。安裝CDH 有三種安裝方式:在線安裝、半離線安裝、離線安裝。在線安裝和離線安裝我都安裝過,雖然在線安裝貌似簡單可是實際用起來仍是沒有離線安裝方便,我仍是建議你們採用離線安裝的方式。不過下面都會介紹在線安裝的方式和離線安裝的方式。但願對別人有所幫助
其它的,ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4。
參考 第一步:
參考
在文件末尾(按快捷鍵,Shift + g)添加bigdata ALL=(ALL) NOPASSWD:ALL
ctrl+o 保存
ctrl+x 退出。
最後,獲得以下
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
防火牆
參考
由此,代表Ubuntu14.04是默認沒開啓防火牆的。
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
若是沒有安裝的話可使用下面的命令安裝一下。
參考
Ubuntu 14.04 安裝 Cloudera Manager 5 And CDH 5 (在線安裝)
bigdata@ubuntucmbigdata1:~$ sudo apt-get install lrzsz bigdata@ubuntucmbigdata1:~$ sudo apt-get install openssh-server
這個工具要裝(你懂得),2個理由:1,能夠遠程管理系統。2,Cloudera Manages 集羣管理須要用該服務。
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
ssh 服務配置、vim的安裝
參考
打開sshd_config文件, 在 /etc/ssh 目錄下。
# Authentication: LoginGraceTime 120 #PermitRootLogin without-password PermitRootLogin yes StrictModes yes
註釋掉 #PermitRootLogin without-password 行。
添加 PermitRootLogin yes 行
修改後,以下:
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
vi /etc/hosts
在裏面添加主機名和IP之間的對應關係
#127.0.1.1 ubuntucmbigdata1 192.168.86.31 ubuntucmbigdata1 192.168.86.32 ubuntucmbigdata2 192.168.86.33 ubuntucmbigdata3 192.168.86.34 ubuntucmbigdata4
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
主機名
bigdata@ubuntucmbigdata1:~$ sudo vim /etc/hostname bigdata@ubuntucmbigdata2:~$ sudo vim /etc/hostname
bigdata@ubuntucmbigdata3:~$ sudo vim /etc/hostname
bigdata@ubuntucmbigdata4:~$ sudo vim /etc/hostname
這裏確定是對的。
見
bigdata@ubuntucmbigdata1:~$ mkdir .ssh bigdata@ubuntucmbigdata1:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/bigdata/.ssh/id_rsa):(回車) Enter passphrase (empty for no passphrase):(回車) Enter same passphrase again: (回車) Your identification has been saved in /home/bigdata/.ssh/id_rsa. Your public key has been saved in /home/bigdata/.ssh/id_rsa.pub. The key fingerprint is: 58:c2:3f:25:cb:82:5b:d5:b4:b2:ea:54:ac:e2:ea:c8 bigdata@ubuntucmbigdata1 The key's randomart image is: +--[ RSA 2048]----+ | . | | . o . | | o = + | | . O * | | . + S | | o = . | | o + | |.. . + | |.Eo.. . | +-----------------+ bigdata@ubuntucmbigdata1:~$ cd .ssh bigdata@ubuntucmbigdata1:~/.ssh$ cat id_rsa.pub >> authorized_keys bigdata@ubuntucmbigdata1:~/.ssh$ cd .. bigdata@ubuntucmbigdata1:~$ chmod 700 .ssh bigdata@ubuntucmbigdata1:~$ chmod 600 .ssh/* bigdata@ubuntucmbigdata1:~$ ssh ubuntucmbigdata1 The authenticity of host 'ubuntucmbigdata1 (127.0.1.1)' can't be established. ECDSA key fingerprint is 1c:85:65:a1:d7:f0:fe:56:4d:86:0f:6e:25:e3:80:46. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata1' (ECDSA) to the list of known hosts. Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Sun Jun 25 14:45:01 2017 from 192.168.86.1 bigdata@ubuntucmbigdata1:~$ exit; logout Connection to ubuntucmbigdata1 closed. bigdata@ubuntucmbigdata1:~$ ssh ubuntucmbigdata1 Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Sun Jun 25 15:52:15 2017 from localhost bigdata@ubuntucmbigdata1:~$ exit;
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
將全部節點(ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4)中的共鑰id_ras.pub拷貝到ubuntucmbigdata1中的authorized_keys文件中。
bigdata@ubuntucmbigdata2:~$ cat ~/.ssh/id_rsa.pub | ssh bigdata@ubuntucmbigdata1 'cat >> ~/.ssh/authorized_keys' The authenticity of host 'ubuntucmbigdata1 (192.168.86.31)' can't be established. ECDSA key fingerprint is 1c:85:65:a1:d7:f0:fe:56:4d:86:0f:6e:25:e3:80:46. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata1,192.168.86.31' (ECDSA) to the list of known hosts. bigdata@ubuntucmbigdata1's password: bigdata@ubuntucmbigdata2:~$
bigdata@ubuntucmbigdata3:~$ cat ~/.ssh/id_rsa.pub | ssh bigdata@ubuntucmbigdata1 'cat >> ~/.ssh/authorized_keys' The authenticity of host 'ubuntucmbigdata1 (192.168.86.31)' can't be established. ECDSA key fingerprint is 1c:85:65:a1:d7:f0:fe:56:4d:86:0f:6e:25:e3:80:46. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata1,192.168.86.31' (ECDSA) to the list of known hosts. bigdata@ubuntucmbigdata1's password: bigdata@ubuntucmbigdata3:~$
bigdata@ubuntucmbigdata4:~$ cat ~/.ssh/id_rsa.pub | ssh bigdata@ubuntucmbigdata1 'cat >> ~/.ssh/authorized_keys' The authenticity of host 'ubuntucmbigdata1 (192.168.86.31)' can't be established. ECDSA key fingerprint is 1c:85:65:a1:d7:f0:fe:56:4d:86:0f:6e:25:e3:80:46. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata1,192.168.86.31' (ECDSA) to the list of known hosts. bigdata@ubuntucmbigdata1's password: bigdata@ubuntucmbigdata4:~$
獲得
bigdata@ubuntucmbigdata1:~$ cd .ssh bigdata@ubuntucmbigdata1:~/.ssh$ ls authorized_keys id_rsa id_rsa.pub known_hosts bigdata@ubuntucmbigdata1:~/.ssh$ cat authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrEPrX5HHQCnwWoavXUoM8N+fINUckzZ7EcDjJqs1EYkrzltdmMrKQv9VeGGj2BPaGoxzmgit+DPFGuPmPgftBOPWQnLVoILqtQd+H5m0wrK67W7Y98cUpZ+0thCbnmUZRuAES1mt2xS/bL2ibw8AvRrd6HUHOhH17Tcd/2gok32ximn48kPzs6li5d2ay8rPqgqD3QQw3NlAhVmK7RVmpsvlHCTnhrQIoNCz8A+adtK5r1jSgH7uKmPAJTqMUP2Zgv02XQTf/kjW3eacNAWR96Khdh0HsktaK6HuC+FFC+8bXqAj4Hih25EX8RTMFMl3nhGT5FPMLyt7C0Z65QhKV bigdata@ubuntucmbigdata1 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDi7mZhUMzB1h7XjWPIZo3w/Tps0Oxr3mgOeKVfoD4pme/lzgTz61FpEmgggc2WB+mNLKSG/WiazTzuSXKUdBXnM5LNeCGV3ZcWBxFrwp2+wAYH6L5wOGqRq+oQzKUHIsvqEc7TBpN3JmaqZOw4zVCwRBBzQ4cg1B2SjSsjDFLBpjlfM+N8UDG+g9OaZDlEu1z5oUyz0KsKbBtvkkSott+sB+EX4zYSDz/cwUPmSf76RJLk89AI8aX4wGS+P4Eahs5/J2wfLOnAWBG2NQoYVPKyN4sXj7OWw+aErriUJXOqLayYV5xSM2yJjT9WuzbNOiR/D7HGZBlC4wXWG+11GdO5 bigdata@ubuntucmbigdata2 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZtE7Z4cXPjv/t0bC4Ozi3HuovI6XiNe+tJ7cQ6WKp/m44a8w/FqgB4HVZLLQusuXwQM/mEzHKiL1EdPsi5om/s7A7xyDakl2OSUOqki871+/TSjFVTUOOz/H/wwHvl2QzBkb8/dMZLphU1/E4odrFhhlhGGpjK5WUdY8cYH6yyli6W3oDPZ55UG+8EnM89T1AyhC1E81xmyMzGMCj4603oZFwckOeff5n2dqeXg0CRhXO9HhsF9kSZQnE2GmR5pLZlORMkitsCKIhaf5UOBzrGENeJylHGCV1F+KlYjQ0ND4ufTUq14aAnUwBOCqCMhB1tBOBGI4O3S0+j27xumwN bigdata@ubuntucmbigdata3 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCXPtqzCU+AmRi+l5lysCEG8gbFKPItYjczvSZIe6+arOfgE/3Ozu2cwr9MABTjgd80hk7ZG4YNRxBPxKvXKtcZxGAe6poe1G5UOrlKOMLeqv1mnUiwtRVsiWp0qnPFcmMt17mpCyN7XnCOLTsdTcl+BVl0c2S2i1xoC6vRKvqV1C/nneJUmuD3KRR1zmR3+a9Wj4yhRRahO6ro/LhgqdwrEaR+NOuT+/1d058fXANToaqyUMa72pz5M2kdxZprumzmHAJ5KlOYImlGrahdLk1wPFckA2m1BMKKycxZHFm1X1O9HeSFrD9N+pdtZY1CXdc6N9hmWKzjBDqw71rZgdUd bigdata@ubuntucmbigdata4 bigdata@ubuntucmbigdata1:~/.ssh$
說明成功!
而後將中ubuntucmbigdata1的authorized_keys文件分發到全部節點上面。
bigdata@ubuntucmbigdata1:~/.ssh$ scp -r authorized_keys bigdata@ubuntucmbigdata2:~/.ssh/ The authenticity of host 'ubuntucmbigdata2 (192.168.86.32)' can't be established. ECDSA key fingerprint is 17:a2:fb:1e:47:dc:79:d5:2d:5a:aa:79:9b:10:c2:eb. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata2,192.168.86.32' (ECDSA) to the list of known hosts. bigdata@ubuntucmbigdata2's password: authorized_keys 100% 1624 1.6KB/s 00:00 bigdata@ubuntucmbigdata1:~/.ssh$ scp -r authorized_keys bigdata@ubuntucmbigdata3:~/.ssh/ The authenticity of host 'ubuntucmbigdata3 (192.168.86.33)' can't be established. ECDSA key fingerprint is 6a:32:65:61:98:78:3f:ad:08:2c:f3:a1:bc:c6:c4:91. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata3,192.168.86.33' (ECDSA) to the list of known hosts. bigdata@ubuntucmbigdata3's password: authorized_keys 100% 1624 1.6KB/s 00:00 bigdata@ubuntucmbigdata1:~/.ssh$ scp -r authorized_keys bigdata@ubuntucmbigdata4:~/.ssh/ The authenticity of host 'ubuntucmbigdata4 (192.168.86.34)' can't be established. ECDSA key fingerprint is f4:d5:92:17:dc:b1:8f:95:61:11:95:cd:d3:fa:2e:57. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ubuntucmbigdata4,192.168.86.34' (ECDSA) to the list of known hosts. bigdata@ubuntucmbigdata4's password: authorized_keys 100% 1624 1.6KB/s 00:00 bigdata@ubuntucmbigdata1:~/.ssh$
你們經過ssh 相互訪問,若是都能無密碼訪問,表明ssh配置成功。這裏很簡單,我就很少贅述了。
bigdata@ubuntucmbigdata1:~$ ssh ubuntucmbigdata1 Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Sun Jun 25 15:52:23 2017 from localhost bigdata@ubuntucmbigdata1:~$ exit;Connection to ubuntucmbigdata1 closed. bigdata@ubuntucmbigdata1:~$ ssh ubuntucmbigdata2 Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Sun Jun 25 15:56:00 2017 from localhost bigdata@ubuntucmbigdata2:~$ exit; logout Connection to ubuntucmbigdata2 closed. bigdata@ubuntucmbigdata1:~$ ssh ubuntucmbigdata3 Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Sun Jun 25 15:56:14 2017 from localhost bigdata@ubuntucmbigdata3:~$ exit; logout Connection to ubuntucmbigdata3 closed. bigdata@ubuntucmbigdata1:~$ ssh ubuntucmbigdata4 Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.2 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Sun Jun 25 15:56:27 2017 from localhost bigdata@ubuntucmbigdata4:~$ exit; logout Connection to ubuntucmbigdata4 closed. bigdata@ubuntucmbigdata1:~$
這樣,就說明是成功!
見
這裏,由於是ubuntu14.04版本,做爲專業人員來講,
bigdata@ubuntucmbigdata1:~$ sudo apt-get remove openjdk*
bigdata@ubuntucmbigdata1:/usr/local$ pwd /usr/local bigdata@ubuntucmbigdata1:/usr/local$ ll total 40 drwxr-xr-x 10 root root 4096 2月 18 2016 ./ drwxr-xr-x 10 root root 4096 2月 18 2016 ../ drwxr-xr-x 2 root root 4096 2月 18 2016 bin/ drwxr-xr-x 2 root root 4096 2月 18 2016 etc/ drwxr-xr-x 2 root root 4096 2月 18 2016 games/ drwxr-xr-x 2 root root 4096 2月 18 2016 include/ drwxr-xr-x 4 root root 4096 2月 18 2016 lib/ lrwxrwxrwx 1 root root 9 6月 24 15:00 man -> share/man/ drwxr-xr-x 2 root root 4096 2月 18 2016 sbin/ drwxr-xr-x 7 root root 4096 2月 18 2016 share/ drwxr-xr-x 2 root root 4096 2月 18 2016 src/ bigdata@ubuntucmbigdata1:/usr/local$ sudo mkdir jdk bigdata@ubuntucmbigdata1:/usr/local$ ll total 44 drwxr-xr-x 11 root root 4096 6月 25 16:08 ./ drwxr-xr-x 10 root root 4096 2月 18 2016 ../ drwxr-xr-x 2 root root 4096 2月 18 2016 bin/ drwxr-xr-x 2 root root 4096 2月 18 2016 etc/ drwxr-xr-x 2 root root 4096 2月 18 2016 games/ drwxr-xr-x 2 root root 4096 2月 18 2016 include/ drwxr-xr-x 2 root root 4096 6月 25 16:08 jdk/ drwxr-xr-x 4 root root 4096 2月 18 2016 lib/ lrwxrwxrwx 1 root root 9 6月 24 15:00 man -> share/man/ drwxr-xr-x 2 root root 4096 2月 18 2016 sbin/ drwxr-xr-x 7 root root 4096 2月 18 2016 share/ drwxr-xr-x 2 root root 4096 2月 18 2016 src/ bigdata@ubuntucmbigdata1:/usr/local$ sudo chown -R bigdata:bigdata jdk/ bigdata@ubuntucmbigdata1:/usr/local$ cd jdk/ bigdata@ubuntucmbigdata1:/usr/local/jdk$ pwd /usr/local/jdk bigdata@ubuntucmbigdata1:/usr/local/jdk$ sudo rz rz waiting to receive. bigdata@ubuntucmbigdata1:/usr/local/jdk$ ll total 177000 drwxr-xr-x 2 bigdata bigdata 4096 6月 25 16:09 ./ drwxr-xr-x 11 root root 4096 6月 25 16:08 ../ -rw-r--r-- 1 root root 181238643 9月 3 2016 jdk-8u60-linux-x64.tar.gz bigdata@ubuntucmbigdata1:/usr/local/jdk$ sudo tar -zxvf jdk-8u60-linux-x64.tar.gz
bigdata@ubuntucmbigdata1:/usr/local/jdk$ ll total 177004 drwxr-xr-x 3 bigdata bigdata 4096 6月 25 16:09 ./ drwxr-xr-x 11 root root 4096 6月 25 16:08 ../ drwxr-xr-x 8 uucp 143 4096 8月 5 2015 jdk1.8.0_60/ -rw-r--r-- 1 root root 181238643 9月 3 2016 jdk-8u60-linux-x64.tar.gz bigdata@ubuntucmbigdata1:/usr/local/jdk$ sudo rm jdk-8u60-linux-x64.tar.gz bigdata@ubuntucmbigdata1:/usr/local/jdk$ sudo chown -R bigdata:bigdata jdk1.8.0_60/ bigdata@ubuntucmbigdata1:/usr/local/jdk$ ll total 12 drwxr-xr-x 3 bigdata bigdata 4096 6月 25 16:10 ./ drwxr-xr-x 11 root root 4096 6月 25 16:08 ../ drwxr-xr-x 8 bigdata bigdata 4096 8月 5 2015 jdk1.8.0_60/ bigdata@ubuntucmbigdata1:/usr/local/jdk$ sudo vim /etc/profile bigdata@ubuntucmbigdata1:/usr/local/jdk$ sudo source /etc/profile sudo: source: command not found bigdata@ubuntucmbigdata1:/usr/local/jdk$ source /etc/profile bigdata@ubuntucmbigdata1:/usr/local/jdk$ java -version java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode) bigdata@ubuntucmbigdata1:/usr/local/jdk$
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
以及,咱們還能夠設置文件打開數量和用於最大進程數
文件打開數量
參考
bigdata@ubuntucmbigdata1:~$ sudo vi /etc/security/limits.conf
* soft nofile 65535 * hard nofile 65535 * soft nproc 32000 * hard nproc 32000
我這裏,僅拿ubuntucmbigdata1來講,其餘的ubuntucmbigdata二、ubuntucmbigdata3和ubuntucmbigdata4是同樣的。
ubuntu系統的root用戶開啓
參考
bigdata@ubuntucmbigdata1:~$ sudo -s root@ubuntucmbigdata1:~# pwd /home/bigdata root@ubuntucmbigdata1:~#
MySQL的安裝(如下步驟僅僅在ubuntucmbigdata1這臺機器上作)
注意:Cloudera-Manages-Server 端 須要安裝 MySQL,Cloudera-Manages-Agent 端 能夠不裝。
即,在我這裏就是,Cloudera-Manages-Server 是cmbigdata1。同時,我也是喜歡把oozie、hive等這些,都是安裝在cmbigdata1這臺機器上。
Cloudera-Manages-Agent,在我這裏就是,cmbigdata二、cmbigdata3和cmbigdata4。
參考
Ubuntu 14.04 MySQL 安裝配置 For Cloudera Manages 5
root@ubuntucmbigdata1:~# apt-get install mysql-server
。。。 。。。 Setting up libdbd-mysql-perl (4.025-1ubuntu0.1) ... Setting up libterm-readkey-perl (2.31-1) ... Setting up mysql-client-5.5 (5.5.55-0ubuntu0.14.04.1) ... Setting up mysql-server-5.5 (5.5.55-0ubuntu0.14.04.1) ... 170625 16:28:33 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 170625 16:28:33 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 170625 16:28:33 [Note] /usr/sbin/mysqld (mysqld 5.5.55-0ubuntu0.14.04.1) starting as process 7930 ... mysql start/running, process 8062 Setting up libhtml-template-perl (2.95-1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up mysql-server (5.5.55-0ubuntu0.14.04.1) ... Processing triggers for libc-bin (2.19-0ubuntu6.7) ... root@ubuntucmbigdata1:~#
安裝成功!
安裝MySql成功後,mysql服務會自動啓動
root@ubuntucmbigdata1:~# service mysql start
或者
root@ubuntucmbigdata1:~# sudo /etc/init.d/mysql start
root@ubuntucmbigdata1:~# apt-get install libmysql-java
設置MySQL的root用戶設置密碼,這一步,就不須要作了,在CentOS版本里,須要作。在Ubuntu版本,在安裝時,就已經設置了。
跳過,就是
Creating Databases for Activity Monitor, Reports Manager, Hive Metastore Server, Sentry Server, Cloudera Navigator AuditServer, and Cloudera Navigator Metadata Server
root@ubuntucmbigdata1:~# mysql -root -p Enter password: (密碼爲rootroot) Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 42 Server version: 5.5.55-0ubuntu0.14.04.1 (Ubuntu) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
執行建立數據庫腳本語句。
mysql> create database hive DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on hive.* TO 'hive'@'localhost' IDENTIFIED BY 'hive_password'; Ignoring query to other database mysql> grant all on *.* TO 'hive'@'ubuntucmbigdata1' IDENTIFIED BY 'hive_password'; Ignoring query to other database mysql> grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive_password'; Ignoring query to other database mysql> create database oozie DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on oozie.* TO 'oozie'@'localhost' IDENTIFIED BY 'oozie_password'; Ignoring query to other database mysql> grant all on *.* TO 'oozie'@'ubuntucmbigdata1' IDENTIFIED BY 'oozie_password'; Ignoring query to other database mysql> grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie_password'; Ignoring query to other database mysql> create database amon DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on amon.* TO 'amon'@'localhost' IDENTIFIED BY 'amon_password'; Ignoring query to other database mysql> grant all on *.* TO 'amon'@'ubuntucmbigdata1' IDENTIFIED BY 'amon_password'; Ignoring query to other database mysql> grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password'; Ignoring query to other database mysql> create database smon DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on smon.* TO 'smon'@'localhost' IDENTIFIED BY 'smon_password'; Ignoring query to other database mysql> grant all on *.* TO 'smon'@'ubuntucmbigdata1' IDENTIFIED BY 'smon_password'; Ignoring query to other database mysql> grant all on smon.* TO 'smon'@'%' IDENTIFIED BY 'smon_password'; Ignoring query to other database mysql> create database rman DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on rman.* TO 'rman'@'localhost' IDENTIFIED BY 'rman_password'; Ignoring query to other database mysql> grant all on *.* TO 'rman'@'ubuntucmbigdata1' IDENTIFIED BY 'rman_password'; Ignoring query to other database mysql> grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman_password'; Ignoring query to other database mysql> create database hmon DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on hmon.* TO 'hmon'@'localhost' IDENTIFIED BY 'hmon_password'; Ignoring query to other database mysql> grant all on *.* TO 'hmon'@'ubuntucmbigdata1' IDENTIFIED BY 'hmon_password'; Ignoring query to other database mysql> grant all on hmon.* TO 'hmon'@'%' IDENTIFIED BY 'hmon_password'; Ignoring query to other database mysql> create database nav DEFAULT CHARACTER SET utf8; Ignoring query to other database mysql> grant all on nav.* TO 'nav'@'localhost' IDENTIFIED BY 'nav_password'; Ignoring query to other database mysql> grant all on *.* TO 'nav'@'ubuntucmbigdata1' IDENTIFIED BY 'nav_password'; Ignoring query to other database mysql> grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav_password'; Ignoring query to other database mysql>
mysql> flush privileges; Query OK, 0 rows affected (0.08 sec) mysql> select user,host,password from mysql.user; +------------------+------------------+-------------------------------------------+ | user | host | password | +------------------+------------------+-------------------------------------------+ | root | localhost | *6C362347EBEAA7DF44F6D34884615A35095E80EB | | root | ubuntucmbigdata1 | *6C362347EBEAA7DF44F6D34884615A35095E80EB | | root | 127.0.0.1 | *6C362347EBEAA7DF44F6D34884615A35095E80EB | | root | ::1 | *6C362347EBEAA7DF44F6D34884615A35095E80EB | | debian-sys-maint | localhost | *0C134AA3949C6DEE1804B1D1D641A7C2824C599A | | scm | % | *E2D6A4ADCCA7B38098E85EAF9BB785AB21451139 | | scm | ubuntucmbigdata1 | *E2D6A4ADCCA7B38098E85EAF9BB785AB21451139 | | scm | localhost | *E2D6A4ADCCA7B38098E85EAF9BB785AB21451139 | | hive | localhost | *8AC2E431CC7A9F2C4C0E51A65B8D8175892D9F22 | | hive | ubuntucmbigdata1 | *8AC2E431CC7A9F2C4C0E51A65B8D8175892D9F22 | | hive | % | *8AC2E431CC7A9F2C4C0E51A65B8D8175892D9F22 | | oozie | localhost | *81A1BB46F79EBD0AA76E6EFAA31D62458CFCAF62 | | oozie | ubuntucmbigdata1 | *81A1BB46F79EBD0AA76E6EFAA31D62458CFCAF62 | | oozie | % | *81A1BB46F79EBD0AA76E6EFAA31D62458CFCAF62 | | amon | localhost | *4A1243A12C2625553EC0465DD4E640DB056AA07A | | amon | ubuntucmbigdata1 | *4A1243A12C2625553EC0465DD4E640DB056AA07A | | amon | % | *4A1243A12C2625553EC0465DD4E640DB056AA07A | | smon | localhost | *F65C49868BBCA6D143F5AF81D1864B1C64DF25B4 | | smon | ubuntucmbigdata1 | *F65C49868BBCA6D143F5AF81D1864B1C64DF25B4 | | smon | % | *F65C49868BBCA6D143F5AF81D1864B1C64DF25B4 | | rman | localhost | *AEF345BFE495D8E678EA9D3D5708FD110AD2F08E | | rman | ubuntucmbigdata1 | *AEF345BFE495D8E678EA9D3D5708FD110AD2F08E | | rman | % | *AEF345BFE495D8E678EA9D3D5708FD110AD2F08E | | hmon | localhost | *DC736DB1383C5AC16BFE895C856F8D30214AF19A | | hmon | ubuntucmbigdata1 | *DC736DB1383C5AC16BFE895C856F8D30214AF19A | | hmon | % | *DC736DB1383C5AC16BFE895C856F8D30214AF19A | | nav | localhost | *993A16D875A9AB1932CC2F57E7DADA76AD35C3B2 | | nav | ubuntucmbigdata1 | *993A16D875A9AB1932CC2F57E7DADA76AD35C3B2 | | nav | % | *993A16D875A9AB1932CC2F57E7DADA76AD35C3B2 | +------------------+------------------+-------------------------------------------+ 29 rows in set (0.00 sec) mysql> exit;
同時,你們能夠關注個人我的博客:
http://www.cnblogs.com/zlslch/ 和 http://www.cnblogs.com/lchzls/
人生苦短,我願分享。本公衆號將秉持活到老學到老學習無休止的交流分享開源精神,匯聚於互聯網和我的學習工做的精華乾貨知識,一切來於互聯網,反饋回互聯網。
目前研究領域:大數據、機器學習、深度學習、人工智能、數據挖掘、數據分析。 語言涉及:Java、Scala、Python、Shell、Linux等 。同時還涉及日常所使用的手機、電腦和互聯網上的使用技巧、問題和實用軟件。 只要你一直關注和呆在羣裏,天天必須有收穫
以及對應本平臺的QQ羣:161156071(大數據躺過的坑)