Alluxio的安装

一、文件下载和解压

1)下载地址:http://www.alluxio.org/download

2) 解压命令如下:

$wgethttp://alluxio.org/downloads/files/1.2.0/alluxio-1.2.0-bin.tar.gz

$tar xvfz alluxio-1.2.0-bin.tar.gz

$cdalluxio-1.2.0

二、 配置文件更改

目前只是基本配置更改:

1) /data/spark/software/alluxio-1.2.0/conf下的  alluxio-env.sh.template 复制一份为: alluxio-env.sh

更改如下:

#!/usr/bin/env bash

#

# The Alluxio Open Foundation licenses this work under the Apache License, version 2.0

# (the "License"). You may not use this work except in compliance with the License, which is

# available at www.apache.org/licenses/LICENSE-2.0

#

# This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,

# either express or implied, as more fully set forth in the License.

#

# See the NOTICE file distributed with this work for information regarding copyright ownership.

#

# Copy it as alluxio-env.sh and edit that to configure Alluxio for your

# site. This file is sourced to launch Alluxio servers or use Alluxio shell

# commands.

#

# This file provides one way to configure Alluxio options by setting the

# following listed environment variables. Note that, setting this file will not

# affect jobs (e.g., Spark job or MapReduce job) that are using Alluxio client

# as a library. Alternatively, you can edit alluxio-site.properties file, where

# you can set all the configuration options supported by Alluxio

# (http://alluxio.org/documentation/)which is respected by both external jobs

# and Alluxio servers (or shell).

# The directory where Alluxio deployment is installed. (Default: the parent directory of libexec/).

exportALLUXIO_HOME=/data/spark/software/alluxio-1.2.0

# The directory where log files are stored. (Default: ${ALLUXIO_HOME}/logs).

# ALLUXIO_LOGS_DIR

# Hostname of the master.

# ALLUXIO_MASTER_HOSTNAME

exportALLUXIO_MASTER_HOSTNAME=spark29

# This is now deprecated. Support will be removed in v2.0

# ALLUXIO_MASTER_ADDRESS

#export ALLUXIO_MASTER_ADDRESS=spark29

# The directory where a worker stores in-memory data. (Default: /mnt/ramdisk).

# E.g. On linux,  /mnt/ramdisk for ramdisk, /dev/shm for tmpFS; on MacOS, /Volumes/ramdisk for ramdisk

# ALLUXIO_RAM_FOLDER

exportALLUXIO_RAM_FOLDER=/data/spark/software/alluxio-1.2.0/ramdisk

# Address of the under filesystem address. (Default: ${ALLUXIO_HOME}/underFSStorage)

# E.g. "/my/local/path" to use local fs, "hdfs://localhost:9000/alluxio" to use a local hdfs

# ALLUXIO_UNDERFS_ADDRESS

exportALLUXIO_UNDERFS_ADDRESS=hdfs://spark29:9000

# How much memory to use per worker. (Default: 1GB)

# E.g. "1000MB", "2GB"

# ALLUXIO_WORKER_MEMORY_SIZE

exportALLUXIO_WORKER_MEMORY_SIZE=12GB

# Config properties set for Alluxio master, worker and shell. (Default: "")

# E.g. "-Dalluxio.master.port=39999"

# ALLUXIO_JAVA_OPTS

# Config properties set for Alluxio master daemon. (Default: "")

# E.g. "-Dalluxio.master.port=39999"

# ALLUXIO_MASTER_JAVA_OPTS

# Config properties set for Alluxio worker daemon. (Default: "")

# E.g. "-Dalluxio.worker.port=49999" to set worker port, "-Xms2048M -Xmx2048M" to limit the heap size of worker.

# ALLUXIO_WORKER_JAVA_OPTS

# Config properties set for Alluxio shell. (Default: "")

# E.g. "-Dalluxio.user.file.writetype.default=CACHE_THROUGH"

# ALLUXIO_USER_JAVA_OPTS

2)worker 下面的添加worker节点的地址

spark24

spark30

spark31

spark32

spark33

三 、主机配置更改

1)在家目录下更改 .bash_profile 添加一下内容:

export TACHYON_HOME=/data/spark/software/alluxio-1.2.0

PATH=$PATH:$HOME/bin:$HADOOP/bin:$JAVA_HOME/bin:$TACHYON_HOME/bin

2) 生效配置

source .bash_profile

四 、Spark 添加依赖Jar

1、在所有的spark主机的spark安装目录下的conf目录下

更改spark-env.sh 后面添加:export SPARK_CLASSPATH="/data/spark/software/spark-1.5.2-bin-hadoop2.6/lib/alluxio-core-client-spark-1.2.0-jar-with-dependencies.jar:$SPARK_CLASSPATH"

五 、分发到各个Worker节点上去

1、alluxio 软件:scp -r ./alluxio-1.2.0spark30:/data/spark/software/

六、格式化和启动

1、进入到alluxio的安装目录下面的bin目录,执行命令: alluxio format  进行内存格式化。

2、启动集群:./alluxio-start.sh all

七、可能遇到问题

1、启动worker报错,报错内容:Pseudo-terminal will not be allocated because stdin is not a terminal.

更改:alluxio\bin\alluxio-workers.sh  的44行内容

原始内容为:

nohup ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no -t ${worker} ${LAUNCHER} \

改成如下:

nohup ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no -tt  $ {worker}  ${LAUNCHER} \

2、如果启动报sudo相关命令错误,是因为启动用户未在sudoers里面,需要将用户添加到此文件中,添加方法搜下root位置,再后面添加即可。

内容如下:

root ALL=(ALL) ALL

spark ALL=(ALL) ALL

同时把此文件中的:#Defaults    requiretty 注释掉。

3、如果还报错,可以在启动master之后,一个一个节点去启动worker。

八、 官网安装说明

官网安装说明:http://www.alluxio.org/docs/master/cn/Running-Alluxio-on-a-Cluster.html 中文的,可以看看。


九、安装后确认

通过访问链接:http://master:19999/ 去查看安装是否成功。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 217,657评论 6 505
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,889评论 3 394
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 164,057评论 0 354
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,509评论 1 293
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,562评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,443评论 1 302
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,251评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,129评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,561评论 1 314
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,779评论 3 335
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,902评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,621评论 5 345
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,220评论 3 328
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,838评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,971评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,025评论 2 370
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,843评论 2 354

推荐阅读更多精彩内容