虚拟机安装Ubuntu与Hadoop
Hadoop 安裝 in Ubuntu 64bit on VMware station
- 1. Install VMware pro 15 on Windows 10.
- 2. Download Ubuntu 64 bit from official website
- 3. 在虛擬機(jī)上安裝Ubuntu
- 4. 安裝Hadoop
- 4.1 Install hadoop on Ubuntu system (PDF)
- 4.2 Installation JDK. Choose Oracle JDK, open JDK not working for me.
- 4.3 Install Hadoop (PDF)
- 4.4 Install eclipse on Ubuntu
- 4.5 Install Hadoop-Eclipse-Plugin (PDF)
- 4.6 Install Apache pig
- 4.7 Run Apache Pig Script
1. Install VMware pro 15 on Windows 10.
可以在VMware官網(wǎng)下載,也可以用胡蘿卜周(很良心的軟件分享者)的網(wǎng)站下載,有注冊(cè)碼。
2. Download Ubuntu 64 bit from official website
直接去官網(wǎng)下載就可以了:https://ubuntu.com/
3. 在虛擬機(jī)上安裝Ubuntu
按照提示一步步操作就可以,要想在宿主機(jī)和虛擬機(jī)復(fù)制粘貼共享文件,可以設(shè)置共享文件夾,安裝vm tools,這一步問(wèn)題很多,解決方法是打vmtools 補(bǔ)丁,如果mnt不了,參考這里:Ubuntu論壇
4. 安裝Hadoop
4.1 Install hadoop on Ubuntu system (PDF)
Download hadoop stable version:
http://apache.mirrors.spacedump.net/hadoop/common/stable/
Note: If VM cannot connect to Wi-Fi network, re-connect your Wi-Fi to make authorization. Change to Bridge connection not working for me.
4.2 Installation JDK. Choose Oracle JDK, open JDK not working for me.
http://www.cnblogs.com/a2211009/p/4265225.html
Use second way, go to official site download the latest version of JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html
sudo mkdir /usr/lib/jvm
sudo tar -zxvf jdk-9.0.1_linux-x64_bin.tar.gz -C /usr/lib/jvm
sudo vim ~/.bashrc (vim: press i to enter insert mode and press esc to return , :wp for save and exit the vim)
#set oracle jdk environment
export JAVA_HOME=/usr/lib/jvm/ jdk-9.0.1
source ~/.bashrc
java –version
4.3 Install Hadoop (PDF)
4.4 Install eclipse on Ubuntu
In the Ubuntu software, search Eclipse and install. Default directory is /usr/lib/eclipse
4.5 Install Hadoop-Eclipse-Plugin (PDF)
Note: Plugin version 2.6 also works for Hadoop 2.9.0 in this case.
4.6 Install Apache pig
https://www.w3cschool.cn/apache_pig/apache_pig_installation.html
Download a release: http://apache.mirrors.spacedump.net/pig/
Note: Restore environment variables:
Export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
4.7 Run Apache Pig Script
hadoop version
start-dfs.sh
cd /$Hadoop_Home/bin/
hdfs dfs -mkdir hdfs://localhost:9000/Pig_Data
cd $HADOOP_HOME/bin
hdfs dfs -put /home/Hadoop/Pig/Pig_Data/student_data.txt dfs://localhost:9000/pig_data/
pig -x local Sample_script.pig
pig -x mapreduce Sample_script.pig
Processing time: 10G ~ 15min (4G ram 2 Cores)
總結(jié)
以上是生活随笔為你收集整理的虚拟机安装Ubuntu与Hadoop的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 出现老是弹出Visual Studio
- 下一篇: 今世缘前三季考卷:江苏市场贡献超九成,3