Install hadoop with Cloudera Manager 5.2 on CentOS 6.5

來源:互聯網
上載者:User

標籤:cloudera


分區考慮,不要使用LVM
root -- >40G

var -- >100G

swap -- 2倍系統記憶體

RAM -- >8GB

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/dfs/dn, for N=0,1,2... (one partition per disk)


Cloudera CDH repository:

http://archive.cloudera.com/cdh5
http://archive-primary.cloudera.com/cm5
http://archive.cloudera.com/gplextras5


Cloudera parcel repository:

http://archive.cloudera.com/cdh5/parcels/latest
http://archive.cloudera.com/gplextras5/parcels/latest
http://archive.cloudera.com/impala/parcels/latest/
http://archive.cloudera.com/sqoop-connectors/parcels/latest/
http://archive.cloudera.com/accumulo-c5/parcels/latest/


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

yum -y install ntp

service ntpd start; chkconfig ntpd on


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


vi /etc/security/limits.conf
*                soft    nofile          32000
*                hard    nofile          32000
*                soft    nproc           unlimited
*                hard    nproc           unlimited
*                soft    memlock         unlimited
*                hard    memlock         unlimited

reboot to take effect


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


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 start; chkconfig mysql on
cat ~/.mysql_secret
mysqladmin -uroot -p‘oldpassword‘ password newpassword
mysql_secure_installation


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/cm520

mkdir /var/www/html/cdh520

mount -o loop cm520.iso /var/www/html/cm520

mount -o loop cdh520.iso /var/www/html/cdh520


cat << EOF > /etc/yum.repos.d/cm520.repo
[cm520]
name=cm520
baseurl=http://192.168.1.19/cm520
enable=1
gpgcheck=0
EOF

yum -y install oracle-j2sdk1.7 cloudera-manager-daemons cloudera-manager-server

ln -s  /usr/java/jdk1.7.0_67-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


wait several minutes, then open http://192.168.1.19:7180

username/password: admin/admin


reboot to confirm it‘s ok, double check cloudera manager web access


if it‘s ok

yum -y install cloudera-manager-agent
service cloudera-scm-agent start


5. on all cluster nodes

cat << EOF > /etc/yum.repos.d/cm520.repo
[cm520]
name=cm520
baseurl=http://192.168.1.19/cm520
enable=1
gpgcheck=0
EOF


cat << EOF > /etc/yum.repos.d/cdh520.repo
[cdh520]
name=cdh520
baseurl=http://192.168.1.19/cdh520
enable=1
gpgcheck=0
EOF


yum -y install oracle-j2sdk1.7 cloudera-manager-agent cloudera-manager-daemons


ln -s  /usr/java/jdk1.7.0_67-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


650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/4C/95/wKioL1RAjmfzC8SjAAPg293yWsA741.jpg" title="cdh.jpg" alt="wKioL1RAjmfzC8SjAAPg293yWsA741.jpg" />


install cloudera management service on cm5.local

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/4C/94/wKiom1RAjkriXmyxAAH0LhUP9pU653.jpg" style="float:none;" title="Snap6.jpg" alt="wKiom1RAjkriXmyxAAH0LhUP9pU653.jpg" />


now add new cluster

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/4C/95/wKiom1RAohazKRY1AAISreAsyps256.jpg" title="Snap14.jpg" alt="wKiom1RAohazKRY1AAISreAsyps256.jpg" />

ok


本文出自 “Ilovecat(個人筆記)” 部落格,請務必保留此出處http://hj192837.blog.51cto.com/655995/1565098

Install hadoop with Cloudera Manager 5.2 on CentOS 6.5

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.