Database Reference
In-Depth Information
This is a gzipped tar file containing the Hadoop 1.2.1 software that you are interested in. Use the Linux gunzip
tool to unpack the gzipped archive:
[hadoop@hc1nn Downloads]$ gunzip hadoop-1.2.1.tar.gz
[hadoop@hc1nn Downloads]$ ls -l
total 202992
-rw-rw-r--. 1 hadoop hadoop 207861760 Mar 15 15:01 hadoop-1.2.1.tar
Then, unpack the tar file:
[hadoop@hc1nn Downloads]$ tar xvf hadoop-1.2.1.tar
[hadoop@hc1nn Downloads]$ ls -l
total 202996
drwxr-xr-x. 15 hadoop hadoop 4096 Jul 23 2013 hadoop-1.2.1
-rw-rw-r--. 1 hadoop hadoop 207861760 Mar 15 15:01 hadoop-1.2.1.tar
Now that the software is unpacked to the local directory hadoop-1.2.1, you move it into a better location. To do
this, you will need to be logged in as root:
[hadoop@hc1nn Downloads]$ su -
Password:
[root@hc1nn ~]# cd /home/hadoop/Downloads
[root@hc1nn Downloads]# mv hadoop-1.2.1 /usr/local
[root@hc1nn Downloads]# cd /usr/local
You have now moved the installation to /usr/local, but make sure that the hadoop user owns the installation.
Use the Linux chown command to recursively change the ownership and group membership for files and directories
within the installation:
[root@hc1nn local]# chown -R hadoop:hadoop hadoop-1.2.1
[root@hc1nn local]# ls -l
total 40
drwxr-xr-x. 15 hadoop hadoop 4096 Jul 23 2013 hadoop-1.2.1
You can see from the last line in the output above that the directory is now owned by hadoop and is a member of
the hadoop group.
You also create a symbolic link to refer to your installation so that you can have multiple installations on the same
host for testing purposes:
[root@hc1nn local]# ln -s hadoop-1.2.1 hadoop
[root@hc1nn local]# ls -l
lrwxrwxrwx. 1 root root 12 Mar 15 15:11 hadoop -> hadoop-1.2.1
drwxr-xr-x. 15 hadoop hadoop 4096 Jul 23 2013 hadoop-1.2.1
The last two lines show that there is a symbolic link called hadoop under the directory /usr/local that points to
our hadoop-1.2.1 installation directory at the same level. If you later upgrade and install a new version of the Hadoop
V1 software, you can just change this link to point to it. Your environment and scripts can then remain static and
always use the path /usr/local/hadoop.
Now, you follow these steps to proceed with installation.
 
Search WWH ::




Custom Search