@zhangyy
2021-06-02T10:27:07.000000Z
字数 5661
阅读 511
大数据运维专栏
- 一: 环境初始化
- 二: 安装CDH6.3.2
系统:CentOS7.5X64cat /etc/hosts----192.168.11.160 dev01.lanxintec.cn192.168.11.161 dev02.lanxintec.cn192.168.11.162 dev03.lanxintec.cn----
做root用户无密钥认证ssh-keygen ---一直敲回车到最后cat id_rsa.pub >> authorized_keyschmod 600 authorized_keys将所有的公钥导入authorized_keys 分发到 所有的 机器的.ssh/ 下面然后测试

所有节点都要配置:yum install -y firewall* iptable*(1) 关闭firewalldsystemctl stop firewalld.servicesystemctl disable firewalld.servicefirewall-cmd --state(2) 关闭iptablesiptables -Fsystemctl stop iptables.serviceservice iptables savesystemctl disable iptables.service(3) 禁用 selinuxsed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/configsetenforce 0getenforce 0sestatus重启机器reboot

vim /etc/security/limits.conf---* soft nofile 65535* hard nofile 1029345* soft nproc unlimited* hard nproc unlimited* soft memlock unlimited* hard memlock unlimited
在其它 节点上面执行命令:rsync -arvzP root@192.168.100.11:/etc/security/limits.conf /etc/security/同步limits.conf 文件

所有机器 yum install chrony*1. dev01.lanxintec.cn---dev03.lanxintec.cn 同步阿里云的时间服务器:vim /etc/chrony.conf 增加----注释掉相关默认的serverserver ntp1.aliyun.com iburstservice chronyd startchkconfig chronyd onservice chronyd stopservice chronyd startchkconfig chronyd on


cdh6.3.2 离线包:CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcelCDH-6.3.2-1.cdh6.3.2.p0.1605554-el6.parcel.sha256manifest.json下载: https://archive.cloudera.com/cdh6/6.3.2/parcels/cdh6.3.1 的CM 包:cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpmcloudera-manager-server-6.3.1-1466458.el7.x86_64.rpmcloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpmcloudera-manager-server-db-2-6.3.1-1466458.el7.x86_64.rpmenterprise-debuginfo-6.3.1-1466458.el7.x86_64.rpmoracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm下载地址:https://archive.cloudera.com/cm6/6.3.1/redhat7/yum/RPMS/x86_64/jdbc 驱动:http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.46/mysql-connector-java-5.1.46.jarhttp://archive.cloudera.com/gplextras/misc/ext-2.2.zip
所用大数据节点都要配置:jdkrpm -ivh oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpmvim /etc/profile---export JAVA_HOME=/usr/java/jdk1.8.0_181-clouderaexport CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jarPATH=$PATH:$HOME/bin:$JAVA_HOME/bin---source /etc/profilejava -version


yum install -y mariadb-serverservice mariadb startchkconfig mariadb onmysql_secure_installationmysql -uroot -pflyfish225

mariadb 优化文件:vim /etc/my.cnf----key_buffer = 32M# (deprecated) key_buffer_size = 32Mmax_allowed_packet = 32Mthread_stack = 256Kthread_cache_size = 64query_cache_limit = 8Mquery_cache_size = 64Mquery_cache_type = 1max_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 MariaDB, if you enable the binary log and do not set#a server_id, MariaDB will not start. The server_id must be unique within#the replicating group.server_id=1binlog_format = mixedread_buffer_size = 2Mread_rnd_buffer_size = 16Msort_buffer_size = 8Mjoin_buffer_size = 8M# InnoDB settingsinnodb_file_per_table = 1innodb_flush_log_at_trx_commit = 2innodb_log_buffer_size = 64Minnodb_buffer_pool_size = 4Ginnodb_thread_concurrency = 8innodb_flush_method = O_DIRECTinnodb_log_file_size = 512M[mysqld_safe]log-error=/var/log/mariadb/mariadb.logpid-file=/var/run/mariadb/mariadb.pid## include all files from the config directory#!includedir /etc/my.cnf.d----
pre01.lanxintec.cn:yum install -y httpd

vim /etc/httpd/conf/httpd.conf----修改/etc/httpd/conf/httpd.conf配置文件,在<IfModule mime_module>中修改以下内容AddType application/x-gzip .gz .tgz .parcel----service httpd startchkconfig httpd on

做CM6.3.1 的 分发源cd /var/www/html/cdh6.3.2createrepo.

vim /etc/yum.repos.d/cloduera-manger.repo------[cmrepo]name = cm_repobaseurl =http://192.168.100.11/cdh6enable = 1gpgcheck = 0-----yum makecache fast

所有主机执行命令同步:rsync -avrzP root@192.168.11.160:/etc/yum.repos.d/cloudera-manager.repo /etc/yum.repos.d/yum makecache fast

cd /usr/share/java/cp -p mysql-connector-java-8.0.15.jar mysql-connector-java.jar

所有大数据节点都要安装:yum -y install chkconfig python bind-utils psmisc libxslt zlib sqlite cyrus-sasl-plain cyrus-sasl-gssapi fuse fuse-libs redhat-lsb postgresql* portmap mod_ssl openssl-devel python-psycopg2 MySQL-python

yum install -y cloudera-manager-server


# mysql -uroot -pflyfish225mysql> create database cmf character set utf8;mysql> grant all privileges on cmf.* to 'cmf'@'%' identified by 'cmf_1234' with grant option;mysql> grant all privileges on cmf.* to 'cmf'@'dev01.lanxintec.cn' identified by 'cmf_1234' with grant option;mysql> flush privileges;

/opt/cloudera/cm/schema/scm_prepare_database.sh mysql cmf cmf cmf_1234

service cloudera-scm-server startcd /var/log/cloudera-scm-server/tail -f cloudera-scm-server.log











echo 10 > /proc/sys/vm/swappinessecho never > /sys/kernel/mm/transparent_hugepage/defragecho never > /sys/kernel/mm/transparent_hugepage/enabled
echo "vm.swappiness = 10" >> /etc/sysctl.confsysctl -p
vim /etc/rc.local----echo never > /sys/kernel/mm/transparent_hugepage/defragecho never > /sys/kernel/mm/transparent_hugepage/enabled---



create database cdh_hive default character set latin1;grant all privileges on cdh_hive.* to 'hive'@'%' identified by 'Hive_123' with grant option;create database cdh_oozie default character set utf8;grant all privileges on cdh_oozie.* to 'oozie'@'%' identified by 'Oozie_123' with grant option;create database cdh_hue default character set utf8;grant all privileges on cdh_hue.* to 'hue'@'%' identified by 'Hue_123' with grant option;create database cdh_rm default character set utf8;grant all privileges on cdh_rm.* to 'rm'@'%' identified by 'Rm_123' with grant option;flush privileges;





