Easy installation of Spark under Ubuntu 14.04

Source: Internet
Author: User
Tags pyspark

Java installation first needs to download on Oracle's website

Create a JVM folder in the Lib directory
 
   
  
  1. sudo mkdir /usr/lib/jvm
Then unzip the file into this folder
 
   
  
  1. sudo tar zxvf jdk-8u40-linux-i586.tar.gz -C /usr/lib/jvm
Go to Unzip folder
 
   
  
  1. cd /usr/lib/jvm

And then change a name for convenience.
sudo mv jdk1.8.0_40 Java

Open configuration file
 
   
  
  1. sudo gedit ~/.bashrc

Add the following settings

  
 
  1. export JAVA_HOME=/usr/lib/jvm/java
  2. export JRE_HOME=${JAVA_HOME}/jre  
  3.     export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
  4.     export PATH=${JAVA_HOME}/bin:$PATH

To make it effective:

 
   
  
  1. source ~/.bashrc
Complete

Install spark download Prebuild's Spark installation package

Extract
 
   
  
  1. tar -xzf spark-1.2.0-bin-hadoop2.4.tgz

Then, in fact, this time Spark's Python mode is ready to use. Just CD in and run the Pyspark in the bin directory. But the next thing we do is link and choose a better location to store the files

Link

Put the file in a different place for the first half of the year.

 
   
  
  1. sudo mv spark-1.2.1-bin-hadoop2.4 /srv/

Then set up a link

 
   
  
  1. sudo ln -s /srv/spark-1.2.1-bin-hadoop2.4/ /srv/spark

You can change the ~/.bash_profile.

 
   
  
  1. export SPARK_HOME=/srv/spark
  2. export PATH=$SPARK_HOME/bin:$PATH
Complete

The command line executes the Pyspark directly



From for notes (Wiz)

Easy installation of Spark under Ubuntu 14.04

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.