您好,登錄后才能下訂單哦!
此篇基本與官方文檔一致,細節不一樣的地方會標注
我的環境:
server1 192.168.1.201 4核 8G 120G(固態)
server2 192.168.1.202 4核 8G 120G+500G(固態)
server3 192.168.1.203 4核 8G 120G+500G(固態)
server4 192.168.1.204 4核 8G 120G+500G(固態)
以上機型用cobbler 批量安裝centos7.5 minimal.
修改hosts 文件,關閉防火墻(批量默認關閉),關閉selinux (批量默認關閉)
4臺主機互相設置免密登陸
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain 192.168.1.201 server1 192.168.1.202 server2 192.168.1.203 server3 192.168.1.204 server4
批量操作可以使用ansible
0,所有節點操作,替換阿里源,epel
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
#yum clean all
#yum makecache fast
1,所有節點操作,添加Cloudera 源和keys
# wget https://archive.cloudera.com/cm6/6.0.1/redhat7/yum/cloudera-manager.repo -P /etc/yum.repos.d/
# rpm --import https://archive.cloudera.com/cm6/6.0.0/redhat7/yum/RPM-GPG-KEY-cloudera
2,server1,配置jdk環境 (此處建議遵循官方文檔yum安裝,不建議手動安裝,后面的Auto-TLS 會有問題)
# yum install oracle-j2sdk1.8
3,server1,安裝Clouder Manager Server (此處建議只安裝cloudera-manager-server)
# yum install cloudera-manager-server
4,server1,Enable Auto_Tls (開啟https 的支持,此為可選操作,我在后面遇到了問題,為了排除問題,所以這一步沒有做)
5,server1,安裝數據庫 (Mariadb,Mysql 都可以的,根據個人喜好,此處Mysql 為例)
# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum update
# yum install mysql-server
修改數據庫的配置文件 # vim /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock transaction-isolation = READ-COMMITTED # Disabling symbolic-links is recommended to prevent assorted security risks; # to do so, uncomment this line: symbolic-links = 0 key_buffer_size = 32M max_allowed_packet = 32M thread_stack = 256K thread_cache_size = 64 query_cache_limit = 8M query_cache_size = 64M query_cache_type = 1 #最大連接數按照內存大小設置,8G為 600左右 max_connections = 550 #expire_logs_days = 10 #max_binlog_size = 100M #log_bin should be on a disk with enough free space. #Replace '/var/lib/mysql/mysql_binary_log' with an appropriate path for your #system and chown the specified folder to the mysql user. log_bin=/var/lib/mysql/mysql_binary_log #In later versions of MySQL, if you enable the binary log and do not set #a server_id, MySQL will not start. The server_id must be unique within #the replicating group. server_id=1 binlog_format = mixed read_buffer_size = 2M read_rnd_buffer_size = 16M sort_buffer_size = 8M join_buffer_size = 8M # InnoDB settings innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 64M innodb_buffer_pool_size = 4G innodb_thread_concurrency = 8 innodb_flush_method = O_DIRECT innodb_log_file_size = 512M [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid sql_mode=STRICT_ALL_TABLES
# systemctl enable mysqld
# systemctl start mysqld
數據庫設置自啟,開啟數據庫以后,初始化一下,按照提示操作
# /usr/bin/mysql_secure_installation
6,server1,按照JDBC 驅動 (參照官網)
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
tar zxvf mysql-connector-java-5.1.46.tar.gz
mkdir -p /usr/share/java/
cd mysql-connector-java-5.1.46
cp mysql-connector-java-5.1.46-bin.jar /usr/share/java/mysql-connector-java.jar
7,server1,創建數據庫 (參照官網,前期我觀察只有scm 一個有用,但是為了后續操作,我全部建立了。)
mysql > CREATE DATABASE<database>DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
mysql > GRANT ALL ON<database>.* TO '<user>'@'%' IDENTIFIED BY '<password>';
8,server1,驗證數據庫鏈接
# /opt/cloudera/cm/schema/scm_prepare_database.sh mysql scm scm (mysql為數據庫類型,scm數據庫名,scm用戶名,然后輸入密碼,成功會有如下提示)
9,所有節點,關鍵的一步 (重命名此文件)
# mv /usr/bin/host /usr/bin/host.bk
10,server1,開啟clouder-scm-server 服務 (時間可能會長一些,數據庫里面要寫入東西)
# systemctl start cloudera-scm-server
查看日志:
# tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log
最好一行出先這個,表示啟動正常
INFO WebServerImpl:com.cloudera.server.cmf.WebServerImpl: Started Jetty server.
瀏覽器登陸(根據瀏覽器語言自動選擇中英文)
http://192.168.1.201:7180
用戶名:admin
密碼:admin
cm6.0.1 的 rpm 包下載地址,如需手動安裝,可下載
https://archive.cloudera.com/cm6/6.0.1/redhat7/yum/RPMS/x86_64/
4個節點之間的時間同步我用的是chrony,大家可以參考
寫的不好,有問題歡迎指正
VX:85862870
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。