In the process of setting up this environment, I had a lot of detours and struggled for several days. I used to transfer files between Windows OS and Ubuntu on vmwarevm, I checked a lot of information on the Internet through sharedfolder to share files between virtual machines and physical hosts. However, I tried many times and installed many new Ubuntu operating systems, however, the file is still not passed through the sharedfolder method. Finally, I learned that if VMwareTool is installed
In the process of setting up this environment, I had a lot of detours and struggled for several days. I used to transfer files between Windows OS and Ubuntu on vmwarevm, I checked a lot of information on the Internet through shared folder to share files between virtual machines and physical hosts. However, I tried many times and installed many new Ubuntu operating systems, however, the shared folder method is still not used to pass the file. Finally, I learned that if VMwareTools is installed, files on the physical host can be directly copied to the virtual machine. At that time, I felt like I had to solve the problem for several days. But when I copied the java installation file from the physical host to the virtual machine, the file is not transmitted in binary mode. Therefore, an error occurs during installation on the Ubuntu operating system. Therefore, a java installation file is downloaded from the VM. And set environment variables. Then Install ssh. Data is transmitted before the user's machine.
Install hadoopand download the latest hadoopinstallation file, hadoop-0.511203.0rc1.tar.gz. Then a folder is created.
$ Mkdir hadoop
Unzipping: $ tar zxvf hadoop-0.20.203.0rc1.tar.gz
$ Ls
Then set the environment variable.
$ Gedit conf/hadoop-env.sh
Add java environment variables:
Export JAVA_HOME =/home/moguichi/java/jdk1.6.0 _ 25, which is the installation path of my jdk.
I thought it was okay to set the java environment for hadoop running, but an error was prompted when running the wordcount example. After online query, you can see that hadoop's hdfs node is not configured. Then you need to set the core-site.xml as follows
$ Gedit conf/core-site.xml
Add in the middle:
Fs. default. name
Hdfs: // localhost: 9000
In setting up hdfs-site.xml
Also add in the middle:
Dfs. replication
1
Then set the mapred-site.xml to also add in the middle
Mapred. job. tracker
Localhost: 9001
Finally run the wordcount instance:
Format HDFS
$ Bin/hadoop namenode-format
Password-free SSH settings
Now, make sure you do not enter the password. log on to localhost Using SSH:
$ Ssh localhost