1、win7安装虚拟机visual box
在上面安装ubuntu kylin 14.04, 原来用vmware,安装起来太大了,好几个G,系统直接卡死。还采用过easy bcd硬盘安装,结果,网络太卡,原生的ubuntu,使用起来费劲,输入法啥的用起来费劲,自己装,试了几次,没成功。
2、安装java7
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installerjava -version
3、安装scala
sudo apt-get install scala
我的版本是2.9.2
4、安装Spark1.0 hadoop1
解压到home目录
5、配置环境变量
sudo gedit /etc/profile
SCALA_HOME = /usr/bin/scalaPATH = $SCALA_HOME/binEXPORT SCALA_HOME
6、启动Spark
scipio@scipio-VirtualBox:~/spark-1.0.0-bin-hadoop1/bin$ ./spark-shellSpark assembly has been built with Hive, including Datanucleus jars on classpath14/06/28 12:02:33 INFO SecurityManager: Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties14/06/28 12:02:33 INFO SecurityManager: Changing view acls to: scipio14/06/28 12:02:33 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(scipio)14/06/28 12:02:33 INFO HttpServer: Starting HTTP ServerWelcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 1.0.0 /_/Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_60)Type in expressions to have them evaluated.Type :help for more information.14/06/28 12:02:46 WARN Utils: Your hostname, scipio-VirtualBox resolves to a loopback address: 127.0.1.1; using 10.0.2.15 instead (on interface eth0)14/06/28 12:02:46 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address14/06/28 12:02:47 INFO SecurityManager: Changing view acls to: scipio14/06/28 12:02:47 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(scipio)14/06/28 12:02:49 INFO Slf4jLogger: Slf4jLogger started14/06/28 12:02:49 INFO Remoting: Starting remoting14/06/28 12:02:50 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://spark@10.0.2.15:34346]14/06/28 12:02:50 INFO Remoting: Remoting now listens on addresses: [akka.tcp://spark@10.0.2.15:34346]14/06/28 12:02:50 INFO SparkEnv: Registering MapOutputTracker14/06/28 12:02:50 INFO SparkEnv: Registering BlockManagerMaster14/06/28 12:02:51 INFO DiskBlockManager: Created local directory at /tmp/spark-local-20140628120250-eeb714/06/28 12:02:51 INFO MemoryStore: MemoryStore started with capacity 297.0 MB.14/06/28 12:02:51 INFO ConnectionManager: Bound socket to port 36388 with id = ConnectionManagerId(10.0.2.15,36388)14/06/28 12:02:51 INFO BlockManagerMaster: Trying to register BlockManager14/06/28 12:02:51 INFO BlockManagerInfo: Registering block manager 10.0.2.15:36388 with 297.0 MB RAM14/06/28 12:02:51 INFO BlockManagerMaster: Registered BlockManager14/06/28 12:02:51 INFO HttpServer: Starting HTTP Server14/06/28 12:02:51 INFO HttpBroadcast: Broadcast server started at http://10.0.2.15:4900714/06/28 12:02:51 INFO HttpFileServer: HTTP File server directory is /tmp/spark-212c4d05-909e-43d7-8d10-6dc496f2c56f14/06/28 12:02:51 INFO HttpServer: Starting HTTP Server14/06/28 12:02:56 INFO SparkUI: Started SparkUI at http://10.0.2.15:404014/06/28 12:03:00 INFO Executor: Using REPL class URI: http://10.0.2.15:3668314/06/28 12:03:00 INFO SparkILoop: Created spark context..Spark context available as sc.
7、SparkUI
Started SparkUI at http://10.0.2.15:4040