Alluxio部署
安装前准备
1.1. 添加环境变量
vi /etc/profile
export ALLUXIO_HOME=/opt/alluxio
export PATH=$PATH:$ALLUXIO_HOME/bin
source /etc/profile
1.2. 创建用户和用户组
groupadd alluxio
useradd alluxio -s /bin/bash -m -g hadoop
usermod -aG hadoop alluxio
安装alluxio
1.3. 解压安装包
tar -zxf alluxio-2.9.3-bin.tar.gz -C /opt
ln -s /opt/alluxio-2.9.3 /opt/alluxio
1.4. 复制文件并修改
复制到其他目录
scp -rp /opt/alluxio-2.9.3 172.16.38.11:/opt
scp -rp /opt/alluxio-2.9.3 172.16.38.12:/opt
scp -rp /opt/alluxio-2.9.3 172.16.38.221:/opt
scp -rp /opt/alluxio-2.9.3 172.16.38.222:/opt
scp -rp /opt/alluxio-2.9.3 172.16.38.223:/opt
其他节点都要做
ln -s /opt/alluxio-2.9.3 /opt/alluxio
修改alluxio-site.properties
vi /opt/alluxio/conf/alluxio-site.properties
将alluxio.master.hostname值改为本地主机名
1.5. 创建并修改权限
mkdir -p /log/alluxio
cp /opt/hadoop-3.2.4/etc/hadoop/core-site.xml /opt/hadoop-3.2.4/etc/hadoop/hdfs-site.xml /opt/alluxio/conf/
chown -R alluxio:alluxio /opt/alluxio/ /log/alluxio
chmod 755 /opt/alluxio/ /log/alluxio
配置alluxio
1.6. 增加alluxio-env.sh
vi /opt/alluxio/conf/alluxio-env.sh
内容如下:
export JAVA_HOME=/opt/jdk1.8
export PATH=$JAVA_HOME/bin:$PATH
export.UTF-8
1.7. 增加alluxio-site.properties
vi /opt/alluxio/conf/alluxio-site.properties
内容如下:
alluxio.master.hostname=DPS2-DA-qas3
alluxio.master.mount.table.root.option.alluxio.underfs.hdfs.configuration=/opt/alluxio/conf/core-site.xml:/opt/alluxio/conf/hdfs-site.xml
alluxio.master.mount.table.root.ufs=hdfs://mycluster/
alluxio.master.journal.type=EMBEDDED
alluxio.master.embedded.journal.addresses=DPS2-DA-qas3:19200,DPS2-DA-qas4:19200,DPS2-DA-qas5:19200
alluxio.master.nameservices.my-alluxio-cluster=master1,master2,master3
alluxio.master.rpc.address.my-alluxio-cluster.master1=DPS2-DA-qas3:19999
alluxio.master.rpc.address.my-alluxio-cluster.master2=DPS2-DA-qas4:19999
alluxio.master.rpc.address.my-alluxio-cluster.master3=DPS2-DA-qas5:19999
alluxio.master.security.impersonation.spark.users=*
alluxio.master.security.impersonation.flink.users=*
alluxio.master.security.impersonation.trino.users=*
alluxio.master.security.impersonation.hive.users=*
alluxio.master.security.impersonation.yarn.users=*
alluxio.master.security.impersonation.alluxio.users=*
alluxio.security.authentication.type=SIMPLE
alluxio.master.security.impersonation.client.groups=*
alluxio.user.short.circuit.enabled=true
#alluxio.security.authentication.type=NOSASL
alluxio.security.authorization.permission.enabled=false
#alluxio.security.login.impersonation.username=none
1.8. 配置masters
vi /opt/alluxio/conf/masters
内容如下:
DPS2-DA-qas3
DPS2-DA-qas4
DPS2-DA-qas5
1.9. 配置workers
vi /opt/alluxio/conf/workers
内容如下:
cv-dsyhdfs01
cv-dsyhdfs02
cv-dsyhdfs03
1.10. 修改alluxio-config.sh
vi /opt/alluxio/libexec/alluxio-config.sh
将ALLUXIO_LOGS_DIR="${ALLUXIO_LOGS_DIR:-${ALLUXIO_HOME}/logs}"改为
ALLUXIO_LOGS_DIR="/log/alluxio"
启动服务
su - alluxio
cd /opt/alluxio
格式化
./bin/alluxio formatMaster
启动
./bin/alluxio-start.sh all SudoMount