Article Title: hadoop deployment in ubuntu. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
There are many tutorials on hadoop deployment in linux, but the same tutorial may have different effects on different machines. Many new users, like me, are reluctant to go to follow for official English deployment. Therefore, I am writing down the hadoop deployment process here. I hope it will be helpful to you.
**************************************** ************
Practice environment:
1. User name: sa, environment: UBUNTU10.04, IP: 192.168.0.102, role: namenode, master, jobtracker
2. User name: sa, environment: UBUNTU9.10, IP: 192.168.0.103, role: datanode, slave, tasktracker
The user names of the two computers must be the same; otherwise, the user names cannot be successfully debugged later.
**************************************** ************
Main steps:
1. Modify the host name.
2. Install SSH to achieve SSH login without a password.
3. Disable the Firewall
4. Install JDK and Hadoop
5. Configure hadoop
**************************************** ************
1. Modify the Host Name:
In the/etc/hosts file, modify:
Sa @ sa :~ $ Cd ..
Sa @ sa:/home $ cd ..
Sa @ sa:/$ cd etc/
Sa @ sa:/etc $ sudo gedit hosts
[Sudo] password for sa:
After entering the password, change the hosts file:
127.0.0.1 localhost. localdomain localhost
192.168.0.102 sa
192.168.0.103 ubuntu
: 1 localhost ip6-localhost ip6-loopback
Fe00: 0 ip6-localnet
Ip6-mcastprefix ff00: 0
Ff02: 1 ip6-allnodes
Ff02: 2 ip6-allrouters
Ff02: 3 ip6-allhosts
(Here # It may not be recognizable. Remove that line)
/*
After all the machines have been changed, ping the machine to see if it is successful:
PING ubuntu (192.168.0.103) 56 (84) bytes of data.
64 bytes from ubuntu (192.168.0.103): icmp_seq = 1 ttl = 64 time = 0.393 MS
64 bytes from ubuntu (192.168.0.103): icmp_seq = 2 ttl = 64 time = 0.374 MS
64 bytes from ubuntu (192.168.0.103): icmp_seq = 3 ttl = 64 time = 0.373 MS
^ C
--- Ubuntu ping statistics ---
3 packets transmitted, 3 bytes ed, 0% packet loss, time 1998 ms
Rtt min/avg/max/mdev = 0.373/0.380/0.393/0.009 MS
*/
**************************************** ************
2. Install SSH to achieve SSH login without a password
2.1 install SSH: sudo apt-get install openssh-server
2.2 SSH password-less login:
See this document here: linux.chinaunix.net/techdoc/net/2007/08/08/964784.shtml "> http://linux.chinaunix.net/techdoc/net/2007/08/08/964784.shtml
Very detailed. The excerpt is as follows:
*************************
Establishing trust relationships between servers is necessary for monitoring server management. Here we will introduce ssh password-less login.
Local ip Address: 192.168.1.6
[Root @ codfei ~] # Ssh-keygen-t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/. ssh/id_rsa ):
/Root/. ssh/id_rsa already exists.
Overwrite (y/n )? Y (I thought I had established a link for 2nd times, so I overwrite the original file here)
Enter passphrase (empty for no passphrase) :( directly press Enter without entering the key)
Enter same passphrase again:
Your identification has been saved in/root/. ssh/id_rsa.
Your public key has been saved in/root/. ssh/id_rsa.pub.
The key fingerprint is:
04: 37: 13: 2a: 4b: 10: af: c1: 2b: 03: 3f: 6b: 27: ce: b9: 62 root @ codfei
[Root @ codfei ~] # Cd. ssh/
[Root @ codfei. ssh] # ll
-Rw ------- 1 root 883 Apr 25 :51 id_rsa
-Rw-r -- 1 root 221 Apr 25 :51 id_rsa.pub
-Rw-r -- 1 root 442 Apr 25 known_hosts
Id_rsa is the key file and id_rsa.pub is the public key file.
[Root @ codfei. ssh] # scp id_rsa.pub192.168.1.4:/root/. ssh/192.168.1.6
Root@192.168.1.4's password:
Id_rsa.pub 100% 221 0.2KB/s
Here, the public key file named the local IP address is used to establish trust relationships with more machines in the future without confusion.
Log on to the host 192.168.1.4.
[Root @ codfei ~] # Cd. ssh/
[Root @ codfei. ssh] # cat 192.168.1.6> authorized_keys
Then go back to the 192.168.1.6 host and directly
[Root @ codfei. ssh] # ssh 192.168.1.4
Last login: Wed Aug 8 12:14:42 2007 from 192.168.1.6
In this way, permissions are occasionally involved. Generally, the./ssh folder is 755. The authorized_keys is 600 or 644.
*************************
[1] [2] Next page