Introduction

As TOEFL test being finally completed, I can enjoy the fun of playing with programs and servers.
Because

1
Cloudera
is still not installed on the new servers, I can do it just taking the time.
Since I have installed
1
Cloudera
on the Dell servers in our department, the progress is so easy for me. However, some of the processes are easy to forget. So I am writing this tips for retrieve later.

Tip1: SSH

There are several problems dealing with SSH in Ubuntu Desktop Edition.\

  1. You have to install ssh first before using it as the edition without it in the beginning.\
  2. You could either to copy the
    1
    public key file
    
    to the slaves or input the password every time.\
  3. For the Ubuntu Desktop Edition, the password of root is not initially set. So if you want to use the
    1
    Cloudera
    
    auto installation tools, you have to set the root password.

This is the command for the upper steps:

1
2
3
4
sudo apt-get install ssh
ssh-keygen -t rsa
scp  masterIP:/home/user/.ssh/id_rsa.pub ~/.ssh/authorized_keys
sudo passwd

Tip2: Hosts

Host IP is really not interesting for me for the sake of the complexity to set it correctly.
Because we have not used the DNS resolving service in our cluster, we have to set the

1
hosts
file manually.
And then use the
1
scp
tools to copy the file to the slaves.

However, there is an easy solution to solve the problem, WINS. WINS is a service for Windows OS to resolve the IP by the hostnames of the VMs.
And I use this service to easily build the hostname to IP service.

For WINS service, there is a tools in Linux to serve as the same as the WINS service in Windows.
It is called

1
winbind
. You can easily install this tool by
1
apt-get
in ubuntu.
And then, you have to edit the
1
nsswitch.conf
file to add
1
wins
resolving service after the
1
dns
.1
In addition, you have to install samba to response the request to get your IP by hostname.

The command in bash to configure and install is here:

1
2
sudo apt-get install winbind
sudo vi /etc/nsswitch.conf

After these you will see some thing like this:

1
hosts:    files mdns4_minimal [NOTFOUND=return] dns mdns4

And then, add

1
wins
in the end, like this:

1
hosts:    files mdns4_minimal [NOTFOUND=return] dns mdns4 wins

With

1
sudo apt-get install samba
, you can finally
1
ping
your Linux by hostname. Like this:
1
ping slave01
.

Here are some tips for hostname in Ubuntu and installing

1
Cloudera
:

  1. You have to use FQDN in Cloudera, because it uses this to resolve your IP. So just the hostname only like
    1
    slave01.local
    
    type is suitable.
  2. WINS service verifies the NetBIOS to resolve the IP and NetBIOS must be less than 15 letters. So your hostname have to be less than 15 letters.

However, there is a problem with WINS. It only provide the service to transform the NetBIOS to IP address, but not the FULL HOSTNAME WITH DOMAIN.
So if your hostname is FQDN like

1
slave01.local
, you only get the short hostname
1
slave01
resolved by the WINS service. But the full hostname with domain like
1
slave01.local
cannot be resolved by the service.
So there is a necessary install a DNS service. I choose the
1
dnsmasq
which is a light DNS resolving software and works only using the
1
hosts
file. With this software, you can easily resolve the full hostname to IP address.

Tip3: Reinstall

There are many problems with reinstalling cloudera-manager-server.
Here is some tips for solving the problems.
Form the official documents, you have to delete the residual files if the installation is aborted intermediately.2
Here is the command:

1
sudo rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera*

Then, some more operation you have to do is to check whether the software is removed correctly.
Here is the list of the software you have to check:

  1. cloudera-manager-server
  2. cloudera-manager-agent
  3. cloudera-manager-deamon
  4. cloudera-manager-server-db-2

I also met some problems with reinstalling cloudera-manager-server.
I got the error message

1
cloudera-manager-server file does not exist
.
Because I delete the service file in the directory
1
/etc/init.d
.
Reinstalling the cloudera-manager-server always get error.
With the command above by the official document, the problem is easily sovled.

Reference