1.官網(wǎng)(https://www.alluxio.org)下載
我這里下載的是最新版本的alluxio-1.7.1-hadoop-2.6
2.解壓
tar -xzf alluxio-1.7.1-hadoop-2.6-bin.tar.gz
3.配置
進(jìn)入conf目錄
alluxio-site.properties
cp alluxio-site.properties.template alluxio-site.properties
alluxio-site.properties
alluxio.master.hostname=os1
同理拷貝alluxio-env.sh.template配置alluxio-env.sh:
export JAVA_HOME=/usr/soft/jdk1.8.0_144/
export ALLUXIO_MASTER_HOSTNAME=os1
4.啟動(dòng)
格式化存儲(chǔ)目錄
./bin/alluxio format
啟動(dòng)
./bin/alluxio-start.sh local
注意這里的啟動(dòng)參數(shù),我開始的時(shí)候是查了網(wǎng)上其他的教程在這卡了好久讶迁。最后通過幫助命令才得解決领跛。
./bin/alluxio-start.sh --help
Usage: alluxio-start.sh [-hNw] ACTION [MOPT] [-f]
Where ACTION is one of:
all [MOPT] Start all masters, proxies, and workers.
local [MOPT] Start all processes locally.
master Start the local master on this node.
secondary_master Start the local secondary master on this node.
masters Start masters on master nodes.
proxy Start the proxy on this node.
proxies Start proxies on master and worker nodes.
safe Script will run continuously and start the master if it's not running.
worker [MOPT] Start a worker on this node.
workers [MOPT] Start workers on worker nodes.
restart_worker Restart a failed worker on this node.
restart_workers Restart any failed workers on worker nodes.
如無意外就可訪問
http://localhost:19999 和 http://localhost:30000
此處用了本地目錄作存儲(chǔ)。
5.Shell 操作
./bin/alluxio fs ls /
查看文件
./bin/alluxio fs copyFromLocal LICENSE /LICENSE
拷貝文件到Alluxio文件系統(tǒng)中
注:把文件存儲(chǔ)在HDFS中
alluxio.underfs.address=hdfs://os1:9000/alluxio/data
(需要提前新建目錄)
產(chǎn)生測(cè)試數(shù)據(jù)
bin/alluxio runTests