Set up CentOS for Hortonworks and Cloudera

#Network

vi /etc/sysconfig/network-scripts/ifcfg-eth0
-> ONBOOT=yes
/etc/sysconfig/network-scripts/ifup eth0

 

#Hostname

$ vi /etc/hosts
-> 192.168.x.x      hostname

 

# If single node, set self ssh keyless access:

$ ssh-keygen
[enter enter enter ....]
$ cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

#If multinodes, set up root ssh keyless access:

# Create ssh key on each node.
$ ssh-keygen
[enter enter enter ....]

# Copy all datanode id_rsa.pub to namenode machine
$ scp /root/.ssh/id_rsa.pub NAMENODEIP:/root/.ssh/DNx.pub

# cat all DNx.pub to authorized_keys file
# On namenode machine:
$ cat /root/.ssh/DNx.pub >> authorized_keys

# Copy authorized_keys to all datanode
$ scp authorized_keys DNx:/root/.ssh/

#Transparent hugepage stop

vi /etc/grub.conf
transparent_hugepage=never

echo never > /sys/kernel/mm/transparent_hugepage/defrag

add this line to

/etc/rc.local

 

#Disable SELinux

$ vi /etc/selinux/config

set

SELINUX=disable

 

#Set swappniess to 0

$ echo vm.swappiness=0 >> /etc/sysctl.conf

REBOOT NOW!

#Start nptd service

$ service ntpd start
chkconfig ntpd on

#Stop iptables

$ service iptables stop

Update kernel if there is warning:
The following hosts are running nonrecommended kernel version 2.6.32-504.el6.x86_64; a stability bug is especially seen on hosts running kernel versions between 2.6.32-491.el6 and 2.6.32-504.16.2.el6(exclusive), and mostly reported on machines with Haswell; upgrading kernel version to 2.6.32-504.16.2.el6 or later is recommended:

yum -y update kernel

 

1 thought on “Set up CentOS for Hortonworks and Cloudera

  1. I am often to blogging and i really appreciate your content. The article has really peaks my interest. I am going to bookmark your site and keep checking for new information.

Leave a Reply

Your email address will not be published. Required fields are marked *