1. 程式人生 > >cloudera manager 5.7 安裝配置以及一些注意事項

cloudera manager 5.7 安裝配置以及一些注意事項

groupadd mysql
useradd -M -g mysql -s /sbin/nologin -d /usr/local/mysql  mysql


tar xf /opt/mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz  -C /usr/local/
cd /usr/local/
ln -s mysql-5.6.34-linux-glibc2.5-x86_64 mysql 
cd /usr/local/mysql
echo "PATH=/usr/local/mysql/bin:$JAVA_HOME/bin:$PATH" >> /etc/profile
source /etc/profile


mkdir -p   /data/mysql/mysql330{6,7,8,9}/{data,tmp,logs}
chown -R mysql:mysql /data/mysql/mysql330{6,7,8,9}


[
[email protected]
mysql]# pwd
/usr/local/mysql


[[email protected] mysql]# cat /data/mysql/mysql3306/my3306.cnf
#my.cnf
[client]
port            = 3306
socket          = /tmp/mysql3306.sock
#socket          = /data/mysql/mysql3306/my3306.sock


[mysql]
prompt="\\[email protected]\\h [\\d]>"
#pager="less -i -n -S"
#tee=/opt/mysql/query.log
no-auto-rehash


[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
log = /opt/mysql/mysqld_multi.log


[mysqld]
#misc
server-id=2513306
user = mysql
basedir = /usr/local/mysql
datadir = /data/mysql/mysql3306/data
port = 3306
socket = /tmp/mysql3306.sock
event_scheduler = 0


tmpdir = /data/mysql/mysql3306/tmp
#timeout
interactive_timeout = 300
wait_timeout = 300


#character set
character-set-server = utf8


open_files_limit = 65535
max_connections = 100
max_connect_errors = 100000
#lower_case_table_names =1
#logs
log-output=file
slow_query_log = 1
slow_query_log_file = slow.log
log-error = error.log
log_warnings = 2
pid-file = mysql.pid
long_query_time = 1
#log-slow-admin-statements = 1
#log-queries-not-using-indexes = 1
log-slow-slave-statements = 1


#binlog
#binlog_format = STATEMENT
binlog_format = row
server-id = 23306
log-bin = /data/mysql/mysql3306/logs/mysql-bin
#binlog_cache_size = 4M
#max_binlog_size = 256M
#max_binlog_cache_size = 1M
sync_binlog = 0
expire_logs_days = 10
#procedure
log_bin_trust_function_creators=1


#
gtid-mode = 0


#relay log
skip_slave_start = 1
max_relay_log_size = 128M
relay_log_purge = 1
relay_log_recovery = 1
relay-log=relay-bin
relay-log-index=relay-bin.index
log_slave_updates
#slave-skip-errors=1032,1053,1062
#skip-grant-tables


#buffers & cache
table_open_cache = 2048
table_definition_cache = 2048
table_open_cache = 2048
max_heap_table_size = 96M
sort_buffer_size = 128K
join_buffer_size = 128K
thread_cache_size = 200
query_cache_size = 0
query_cache_type = 0
query_cache_limit = 256K
query_cache_min_res_unit = 512
thread_stack = 192K
tmp_table_size = 96M
key_buffer_size = 8M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 32M


#myisam
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1


#innodb
innodb_buffer_pool_size = 100M
innodb_buffer_pool_instances = 1
innodb_data_file_path = ibdata1:100M:autoextend
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 100M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 50
innodb_file_per_table = 1
innodb_rollback_on_timeout
innodb_status_file = 1
innodb_io_capacity = 2000
transaction_isolation = READ-COMMITTED
innodb_flush_method = O_DIRECT




./scripts/mysql_install_db --defaults-file=/data/mysql/mysql3306/my3306.cnf  -- 初始化
mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf  &    -- 啟動資料庫

 --- 開機自動啟動資料庫 
echo "/usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf  &" >> /etc/rc.local 


mysql -S /tmp/mysql3306.sock
mysqladmin -S /tmp/mysql3306.sock shutdown     ---- 乾淨的關閉資料庫


[
[email protected]
mysql]# mysqladmin -S /tmp/mysql3306.sock shutdown
[[email protected] mysql]# ps -ef | grep mysql
mysql      4201   3816  0 18:23 pts/1    00:00:01 mysqld --defaults-file=/data/mysql/mysql3307/my3307.cnf
root       4239   3816  0 18:28 pts/1    00:00:00 grep mysql
[1]-  Done                    mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf

[
[email protected]
~]# mysql -S /tmp/mysql3306.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1060
Server version: 5.6.34-log MySQL Community Server (GPL)


Copyright (c) 2000, 2016, 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> set password =password('oracle');
Query OK, 0 rows affected (0.37 sec)

mysql> source /opt/Init_mysql.sql   或是 複製下面的內容

create database cmf DEFAULT CHARACTER SET utf8;
grant all on cmf.* TO 'cmf'@'%' IDENTIFIED BY 'cmf_password';
grant all on cmf.* TO 'cmf'@'localhost' IDENTIFIED BY 'cmf_password';

create database amon DEFAULT CHARACTER SET utf8;
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password';

grant all on amon.* TO 'amon'@'localhost' IDENTIFIED BY 'amon_password';

create database smon DEFAULT CHARACTER SET utf8;
grant all on smon.* TO 'smon'@'%' IDENTIFIED BY 'smon_password';
grant all on smon.* TO 'smon'@'localhost' IDENTIFIED BY 'smon_password';

create database rman DEFAULT CHARACTER SET utf8;
grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman_password';
grant all on rman.* TO 'rman'@'localhost' IDENTIFIED BY 'rman_password';

create database hmon DEFAULT CHARACTER SET utf8;
grant all on hmon.* TO 'hmon'@'%' IDENTIFIED BY 'hmon_password';
grant all on hmon.* TO 'hmon'@'localhost' IDENTIFIED BY 'hmon_password';
create database nav DEFAULT CHARACTER SET utf8;
grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav_password';
grant all on nav.* TO 'nav'@'localhost' IDENTIFIED BY 'nav_password';

create database hive DEFAULT CHARACTER SET utf8;
grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive_password';
grant all on hive.* TO 'hive'@'localhost' IDENTIFIED BY 'hive_password';

create database rmon DEFAULT CHARACTER SET utf8;
grant all on rmon.* TO 'rmon'@'%' IDENTIFIED BY 'rmon_password';
grant all on rmon.* TO 'rmon'@'localhost' IDENTIFIED BY 'rmon_password';

create database oozie DEFAULT CHARACTER SET utf8;
grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie_password';
grant all on oozie.* TO 'oozie'@'localhost' IDENTIFIED BY 'oozie_password';
flush privileges;

=== 主機準備工作== 

(1)主機名解析

[[email protected] local]# cat /etc/hosts | grepcdh

192.168.137.141     cdh1

192.168.137.142     cdh2

192.168.137.143     cdh3

2)  配置Java 

Mkdir –p /usr/java

tar xf jdk-7u79-linux-x64.tar.gz -C/usr/java

 export JAVA_HOME=/usr/java/jdk1.7.0_79

exportCLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

exportPATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

(3)selinux 設定

[[email protected] local]# cat/etc/sysconfig/selinux  |grep disable

#    disabled - No SELinux policy is loaded.

SELINUX=disabled

(4)防火牆設定

[[email protected] local]# /etc/init.d/iptablesstatus

iptables: Firewall is not running.

[[email protected] local]# chkconfig iptables off

(5)  時間同步

ntpdate pool.ntp.org

-》第一處修改:修改為自己的網段

                                               #Hosts on local network are less restricted.

                                               restrict192.168.189.0 mask 255.255.255.0 nomodify notrap

                                               -》第二處修改:將三個服務地址註釋掉,因為不是外網不需要

                                               #Use public servers from the pool.ntp.org project.

                                               #Please consider joining the pool (http://www.pool.ntp.org/join.html).

                                               #server0.centos.pool.ntp.org

                                               #server1.centos.pool.ntp.org

                                               #server2.centos.pool.ntp.org

                                               -》第三處修改:新增設定ntp本地服務

                                               server  127.127.1.0     # local clock

                                               fudge   127.127.1.0 stratum 10

                                               -》配置完成後,需要重啟ntpd服務

                                               $sudo service ntpd restart

                                               crontab-e制定定時任務自動同步時間:

                                               ##synctime

                                               0-59/10* * * * /usr/sbin/ntpdate cdh1

                                               執行時間同步:

                                               $sudo /usr/sbin/ntpdate cdh1

                                               $sudo vi /etc/sysconfig/ntpd

$ sudo vi /etc/sysconfig/ntpd

                                               與BIOS時間同步

                                               #Drop root to id 'ntp:ntp' by default.

                                              SYNC_HWCLOCK=yes   是否允許與BIOS系統時間同步

                                               OPTIONS="-untp:ntp -p /var/run/ntpd.pid -g"        

===CM 離線安裝前的準備工作=== 

下載CM 相關的軟體,根據需求下載相關係統版本的CM軟體,最好先本地下載好 然後再上傳到Linux主機!

http://archive.cloudera.com/cdh5/parcels/      下載地址

http://archive.cloudera.com/cm5/repo-as-tarball/   地址  

開始安裝之前  要檢查 HTTP服務是否正常執行

[[email protected] html]# pwd

/var/www/html

[[email protected] html]#mkdir parcels

[[email protected] html]#cd parcels

將下載好的軟體上傳到 該目錄

CDH-5.7.6-1.cdh5.7.6.p0.6-el6.parcel

CDH-5.7.6-1.cdh5.7.6.p0.6-el6.parcel.sha1 -- 該檔案需要重新命名,去掉結尾的1 即可

manifest.json 檔案

將cm5.7.0-centos6.tar.gz  上傳到 /var/www/html/

tar  xf cm5.7.0-centos6.tar.gz 

[[email protected] html]# mkdir -p cm5/redhat/6/x86_64/

[[email protected] html]# mv cm cm5/redhat/6/x86_64/

sudo vim /etc/yum.repos.d/cloudera-manager.repo
[cloudera-manager]
name = Cloudera Manager, Version 5.7.6
baseurl = http://192.168.137.141/cm5/redhat/6/x86_64/cm/5/
gpgcheck = 0



8.瀏覽器檢視下面兩個網址是否出來,假如有,就配置成功
http://192.168.137.141/parcels/

http://1192.168.137.141/cm5/redhat/6/x86_64/cm/5/

===正常離線安裝CM 

cd /usr/share/java

unzipmysql-connector-java-5.1.40.zip

cdmysql-connector-java-5.1.40

cpmysql-connector-java-5.1.37-bin.jar /usr/share/java


1) 安裝cm 軟體

cd  /var/www/html/cm5/redhat/6/x86_64/cm/5/RPMS/x86_64

yumisntall cloudera-manager-daemons-5.7.6-1.cm570.p0.76.el6.x86_64.rpm -y

yuminstall -y cloudera-manager-server-5.7.6-1.cm570.p0.76.el6.x86_64.rpm

2)modifycloudera-scm-server connect to MySQL

[[email protected] ~]#vi /etc/cloudera-scm-server/db.properties

# Copyright (c) 2012 Cloudera, Inc. All rights reserved.                             

#

# This filedescribes the database connection.

#

# Thedatabase type

# Currently'mysql', 'postgresql' and 'oracle' are valid databases.

com.cloudera.cmf.db.type=mysql

# Thedatabase host

# If a nonstandard port is needed, use 'hostname:port'

com.cloudera.cmf.db.host=localhost

# Thedatabase name

com.cloudera.cmf.db.name=cmf

# Thedatabase user

com.cloudera.cmf.db.user=cmf

# Thedatabase user's password

com.cloudera.cmf.db.password=cmf_password

# The dbsetup type

# Bydefault, it is set to INIT

# Ifscm-server uses Embedded DB then it is set to EMBEDDED

# Ifscm-server uses External DB then it is set to EXTERNAL

com.cloudera.cmf.db.setupType=EXTERNAL

 上面綠顏色的為 初次安裝5.9及以後的版本 才會有必須選擇外部源, 要是5.9之前的版本升級過來的話 這裡可以不予理會

3) 啟動CM 並安裝配置CM 相關

service cloudera-scm-server start

#Logmessage:

User:admin

Password:admin





為 CDH 群集安裝指定主機。 - Cloudera Manager



05選擇儲存庫

#假如網路下載速度很堪憂,那麼就配置本地儲存庫”,參考


06JDK安裝選項(不勾選)



啟用單使用者模式(不啟用)



提供SSH登入憑據


09正在安裝



11 正在安裝選定Parcel(安裝前,將安裝包下載到opt%cloudera%parcel-repo資料夾下,否則根據頻寬慢慢download)

12檢查主機準確性


13檢查主機準確性--warnings


14 檢查主機準確性--不適用.jpg


15 檢查主機準確性--ok

16 選擇您要在叢集上安裝的CDH5服務(HDFS+MapReduce+Zookeeper+Hive)



17自定義角色分配

18 資料庫設定 

審計更改


首次執行服務


成功完成叢集安裝





















相關推薦

cloudera manager 5.7 安裝配置以及一些注意事項

groupadd mysqluseradd -M -g mysql -s /sbin/nologin -d /usr/local/mysql  mysqltar xf /opt/mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz  -C /us

Linux上安裝Zookeeper以及一些注意事項

最近打算出一個系列,介紹Dubbo的使用。 分散式應用現在已經越來越廣泛,Spring Could也是一個不錯的一站式解決方案,不過據我瞭解國內目前貌似使用阿里Dubbo的公司比較多,一方面這個框架也確實很OK,另一方面可能也是因為Dubbo的中文文件比較

阿里雲 Linux(CentOS)中MySQL5.7安裝配置以及遠端連線配置最新完整版

1, mysql57-community-release-el7-11.noarch.rpm 點選下載並上傳到阿里雲。 2,切換資料夾,然後一步步輸入下面三條命令,即安裝好的MySQL的 (1),rpm -ivh mysql57-community-release-el7-1

Ubuntu16.04環境下MySQL5.7安裝&配置以及遠端訪問

mysql> set character_set_client=utf8; mysql> set character_set_connection=utf8; mysql> set character_set_database=utf8; mysql> set charact

linux系統的安裝以及一些注意事項

最近看gradle時發現作者說用ubantu比較好,由於以前一直在使用windows和mac所以對linux系統一直不懂。前幾天湊五一假期把linux系統安裝了一下,由於以前電腦上安裝的是windows,所以一開始找了好多安裝雙系統的文件,看了好多,但是就是easyBCD下載

LNMP配置一些注意事項(僅供參考)

cd ~ rz Anaconda3-5.2.0-Linux-x86_64.sh sh Anaconda3-5.2.0-Linux-x86_64.sh #next->yes->next ...yes....no cd ~/anaconda3/bin m

DB2安裝步驟和一些注意事項

      由於最近的專案中用到了db2這個資料庫,以前沒有使用過,所以遇上了很多的問題,比如在下載的過程中,網上很少有能直接下載的地方,IBM的官網基本上是下載不了的,最後經歷了“千辛萬苦”,才找到了能下載的地址,在最後的安裝過程中也出現了不少的問題。廢話不多說,現將一些

mybatis中mapper的用法以及一些注意事項

        這幾天在公司做專案,到了收尾的階段,但是發現自己在使用mybatis的時候給自己留下了很多的坑,於是乎花了兩天的時間來除錯和重新構思自己寫下的mapper.xml檔案,總算是有些收穫,

linux平臺下(Ubuntu16.04)安裝配置mysql(5.7.24)以及圖形管理工具Workbench

1.在ubuntu系統下,開啟終端 方法(1):在左上角的選單上點一下,出來一列,在裡面選擇[附件] 中的[終端],點一下就OK。 方法(2):快捷鍵Ctrl+Alt+T   2.安裝MySQL5.7需要的依賴,使用命令: sudo apt-get install

CDH5實踐(四)Cloudera Manager 5安裝中碰到的一些問題和解決辦法

問題一:安裝過程中會出現失敗,檢視detail資訊中,提示 host 無法連線 解決:前面的文章中漏了對主機host的一個修改, 除了修改 /etc/hosts 檔案外,我們還需要修改修改  /et

CENTOS 7.5離線安裝Cloudera Manager 5和CDH5(5.15.0) 完全教程

特別宣告:LZ按照教程完整的走了一遍,最終所有元件都是正常的,中間遇到很多坑,做了一些修改,本文最後會將遇到的一些坑總結到一片新文章中 windows虛擬機器安裝CDH cpu 16G記憶體 預設單核單線 DEV2 Server&&a

win10 mysql-5.7.21 ZIP 格式的安裝配置以及初始密碼修改

每篇一句: There will always be prettier and uglier people than you. Accept it and move on. Mysql 5.7.21(Zip)的安裝配置: 解壓縮: 解

Cloudera Manager 5和CDH5離線安裝,CDH-5.7.1

進行了大範圍修改和完善 檔案下載 CDH (Cloudera’s Distribution, including Apache Hadoop),是Hadoop眾多分支中的一種,由Cloudera維護,基於穩定版本的Apache Hadoop構建,並集成了很多補

Cloudera Manager 5 和 CDH5.7.0 本地(離線)安裝

轉載:http://blog.csdn.net/eason_oracle/article/details/51818423 最近在搞cloudera manager的安裝,經歷了許多坎坷,總結一下: 另外也參考了一些其他人的帖子如: http://blog.csdn

手動安裝cloudera manager 5.x(tar包方式)詳解

text res 三種 href none bin -i min devel 官方共給出了3中安裝方式:第一種方法必須要求所有機器都能連網,由於最近各種國外的網站被墻的厲害,我嘗試了幾次各種超時錯誤,巨耽誤時間不說,一旦失敗,重裝非常痛苦。第二種方法下載很多包。第三種方法對

CentOS 7 安裝配置分布式文件系統 FastDFS 5.10

fastdfs下載目前作者最後一次releases的時間的17年4月6號,對應的最新版本是5.10,直接在余大的GitHub上下載就可以了: https://github.com/happyfish100/fastdfs/releases如上圖,由於FastDFS是純C語言實現,只支持Linux、FreeBS

《net-snmp-5.7.3配置編譯安裝

設置 bus 重命名 tree control examples password 取消 mark 先看一下系統環境 [email protected]pc:~/work/_snmp/net-snmp-5.7.3$ uname -a Linux o-pc 3.16

Cloudera manager的服務安裝以及spark升級到2.2

apache 廣泛 5.1 cti sha topic file chgrp 擁有 一、Cloudera manager的服務安裝 包含2個: 1、 是軟件包的分發、安裝 此種方式安裝的時候。Cloudera manager會在激活這個步驟驗證軟件的版本和當前cd

mysql-5.7安裝配置

就是 .repo systemctl 清除 遠程工具 添加 iptable community ant 1.進入到要存放安裝包的位置 cd /home/lnmp 2.查看系統中是否已安裝 MySQL 服務,以下提供兩種方式: rpm -qa | grep mysq

Linux 使用rpm方式安裝最新mysql(5.7)步驟以及常見問題解決

linu x86_64 linux 很多 輸入密碼 alt oca mysq mon 第一步:下載rpm包 mysql官網下載:http://dev.mysql.com/downloads/mysql/ 但如果你的下載網速不好的話也可以點下面的鏈接下載自己想要的版本 ht