标签:cloudera
分区考虑,不要使用LVM
root -- > 20G
swap -- 2倍系统内存
RAM -- >4GB
Master node:
RAID 10, dual Ethernet cards, dual power supplies, etc.
Slave node:
1. RAID is not necessary
2. HDFS分区, not using LVM
/etc/fstab -- ext3 defaults,noatime
挂载到/data/N, for N=0,1,2... (one partition per disk)
Cloudera repository:
http://archive.cloudera.com/cdh5/
http://archive-primary.cloudera.com/cm5/
on cloudera manager and all cluster nodes:
at least 3 Servers for ZooKeeper, 3 DataNodes for HDFS.
1.disable selinux and iptables
service iptables stop
chkconfig iptables off; chkconfig ip6tables off
setenforce 0
vi /etc/sysconfig/selinux
SELINUX=disabled
2. disable ipv6
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p
3. vi /etc/hosts to add all hosts FQDN, like below:
192.168.1.19 cm5.local cm5
192.168.1.20 master1.local master1 # HDFS NameNode
192.168.1.21 master2.local master2 # YARN ResourceManager
192.168.1.22 slave1.local slave1
192.168.1.23 slave2.local slave2
vi /etc/sysconfig/network to set FQDN
cat << EOF > /etc/yum.repos.d/iso.repo
[iso]
name=iso
baseurl=http://mirrors.aliyun.com/centos/6.5/os/x86_64
enable=1
gpgcheck=0
EOF
yum -y install openssh-clients
echo "vm.swappiness = 0" >> /etc/sysctl.conf
sysctl -p
4. On cloudera manager, we will install mysql 5.6 and apache
rpm -e --nodeps mysql-libs
yum -y install libaio perl
rpm -ivh MySQL-shared-compat-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-shared-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.20-1.el6.x86_64.rpm
service mysql start; chkconfig mysql on
cat ~/.mysql_secret
mysqladmin -uroot -p‘oldpassword‘ password newpassword
mysql_secure_installation
mv /var/lib/mysql/ib_logfile* /backup
vi /etc/my.cnf
[mysqld]
transaction-isolation=READ-COMMITTED
# symbolic-links=0
key_buffer = 16M
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
max_connections = 550
log-bin=mysql-bin
binlog_format=mixed
expire_logs_days=10
max_binlog_size=100M
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
service mysql restart
Install mysql jdbc connector:
tar zxf mysql-connector-java-5.1.33.tar.gz
mkdir /usr/share/java
cp mysql-connector-java-5.1.33/mysql-connector-java-5.1.33-bin.jar /usr/share/java/mysql-connector-java.jar
mysql -u root -p
# for Activity Monitor
create database amon DEFAULT CHARACTER SET utf8;
grant all on amon.* TO ‘amon‘@‘%‘ IDENTIFIED BY ‘amon‘;
grant all on amon.* TO ‘amon‘@‘localhost‘ IDENTIFIED BY ‘amon‘;
# for Reports Manager
create database rman DEFAULT CHARACTER SET utf8;
grant all on rman.* TO ‘rman‘@‘%‘ IDENTIFIED BY ‘rman‘;
grant all on rman.* TO ‘rman‘@‘localhost‘ IDENTIFIED BY ‘rman‘;
# for Hive Metastore Server
create database metastore DEFAULT CHARACTER SET utf8;
grant all on metastore.* TO ‘hive‘@‘%‘ IDENTIFIED BY ‘hive‘;
grant all on metastore.* TO ‘hive‘@‘localhost‘ IDENTIFIED BY ‘hive‘;
# for Sentry Server
create database sentry DEFAULT CHARACTER SET utf8;
grant all on sentry.* TO ‘sentry‘@‘%‘ IDENTIFIED BY ‘sentry‘;
grant all on sentry.* TO ‘sentry‘@‘localhost‘ IDENTIFIED BY ‘sentry‘;
# for Cloudera Navigator Audit Server
create database nav DEFAULT CHARACTER SET utf8;
grant all on nav.* TO ‘nav‘@‘%‘ IDENTIFIED BY ‘nav‘;
grant all on nav.* TO ‘nav‘@‘localhost‘ IDENTIFIED BY ‘nav‘;
flush privileges;
yum -y install httpd
service httpd start; chkconfig httpd on
mkdir /var/www/html/cm513
mkdir /var/www/html/cdh513
mount -o loop cm513.iso /var/www/html/cm513
mount -o loop cdh513.iso /var/www/html/cdh513
cat << EOF > /etc/yum.repos.d/cm513.repo
[cm513]
name=cm513
baseurl=http://192.168.1.19/cm513
enable=1
gpgcheck=0
EOF
cat << EOF > /etc/yum.repos.d/cdh513.repo
[cdh513]
name=cdh513
baseurl=http://192.168.1.19/cdh513
enable=1
gpgcheck=0
EOF
yum -y install oracle-j2sdk1.7 cloudera-manager-daemons cloudera-manager-server cloudera-manager-agent
ln -s /usr/java/jdk1.7.0_55-cloudera /usr/java/default
echo ‘export JAVA_HOME=/usr/java/default‘ >> /etc/profile
echo ‘export PATH=$JAVA_HOME/bin:$PATH‘ >> /etc/profile
source /etc/profile
/usr/share/cmf/schema/scm_prepare_database.sh mysql -uroot -ppassword cm5 cm5 cm5
service cloudera-scm-server start
service cloudera-scm-agent start
username/password: admin/admin
5. on all cluster nodes
cat << EOF > /etc/yum.repos.d/cm513.repo
[cm513]
name=cm513
baseurl=http://192.168.1.19/cm513
enable=1
gpgcheck=0
EOF
cat << EOF > /etc/yum.repos.d/cdh513.repo
[cdh513]
name=cdh513
baseurl=http://192.168.1.19/cdh513
enable=1
gpgcheck=0
EOF
yum -y install oracle-j2sdk1.7 cloudera-manager-agent cloudera-manager-daemons
ln -s /usr/java/jdk1.7.0_55-cloudera /usr/java/default
echo ‘export JAVA_HOME=/usr/java/default‘ >> /etc/profile
echo ‘export PATH=$JAVA_HOME/bin:$PATH‘ >> /etc/profile
source /etc/profile
vi /etc/cloudera-scm-agent/config.ini
server_host=cm5.local
server_port=7182
service cloudera-scm-agent start
yum -y install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-hdfs-nfs3 hadoop-httpfs hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-python sqoop sqoop2 whirr
本文出自 “Ilovecat(个人笔记)” 博客,请务必保留此出处http://hj192837.blog.51cto.com/655995/1562854
Install hadoop with Cloudera Manager 5 on CentOS 6.5
标签:cloudera
原文地址:http://hj192837.blog.51cto.com/655995/1562854