Set up CentOS for Hortonworks and Cloudera


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



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


# If single node, set self ssh keyless access:

$ ssh-keygen
[enter enter enter ....]
$ cat /root/.ssh/ >> /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 to namenode machine
$ scp /root/.ssh/ NAMENODEIP:/root/.ssh/

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

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

#Transparent hugepage stop

vi /etc/grub.conf

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

add this line to



#Disable SELinux

$ vi /etc/selinux/config




#Set swappniess to 0

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


#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 *