前提准备
连接服务器工具:MobaXterm_Personal_12.1 (目前使用),xshell
安装注意事项
1.默认情况下,tableau server 安装目录在/opt目录中,对于win 的program file目录
2.linux版本tableau server 不支持下划线_,或者点.的主机名
3.需要有静态的IPv4地址
4.开发端口号80,8850(tsm)
5.使用订阅功能,需要解封25端口,支持TLS587协议端口
前期配置
查看防火墙状态
systemctl status firewalld
关闭和开启防火墙
systemctl stop/start firewalld
临时关闭SELinux/防火墙
setenforce 0
iptables -F
第一步先创建一个安装用户
注意:重点 重点 不能用root用户安装 不能用root用户安装
登录root用户添加组
#添加组
groupadd tableau
#添加安装用户
useradd admin -g tableau
#设置用户密码并激活
passwd admin
添加普通用户具有sudo权限
修改 /etc/sudoers
需要使用 visudo 指令
visudo
添加代码
a键可以进入编辑模式,移动光标至文末加入以下代码
admin ALL=(ALL) ALL
然后ESC退出编辑模式
输入 :wq! 保存并退出
切换安装用户admin
su admin
cd /home/admin
tableau server环境搭建
上传 tableau serve -rpm
文件夹是我用root用户创建的,所以这里需要改一下文件是所有者,不然上次rpm包admin用户不能对此操作。
安装包及依赖
[admin@hadoop software]$ sudo yum -y install tableau-server-2022-1-2.x86_64.rpm
安装过程详细:
[admin@hadoop software]$ sudo yum -y install tableau-server-2022-1-2.x86_64.rpm
已加载插件:fastestmirror, langpacks
正在检查 tableau-server-2022-1-2.x86_64.rpm: tableau-server-20221.22.0516.1720-20221-22.0516.1720.x86_64
tableau-server-2022-1-2.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 tableau-server-20221.22.0516.1720.x86_64.0.20221-22.0516.1720 将被 安装
--> 正在处理依赖关系 chrpath,它被软件包 tableau-server-20221.22.0516.1720-20221-22.0516.1720.x86_64 需要
Loading mirror speeds from cached hostfile
* base: mirrors.bupt.edu.cn
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
--> 正在处理依赖关系 freeglut,它被软件包 tableau-server-20221.22.0516.1720-20221-22.0516.1720.x86_64 需要
--> 正在处理依赖关系 redhat-lsb-core,它被软件包 tableau-server-20221.22.0516.1720-20221-22.0516.1720.x86_64 需要
--> 正在检查事务
---> 软件包 chrpath.x86_64.0.0.16-0.el7 将被 安装
---> 软件包 freeglut.x86_64.0.3.0.0-8.el7 将被 安装
---> 软件包 redhat-lsb-core.x86_64.0.4.1-27.el7.centos.1 将被 安装
--> 正在处理依赖关系 redhat-lsb-submod-security(x86-64) = 4.1-27.el7.centos.1,它被软件包 redhat-lsb-core-4.1-27.el7.centos.1.x86_64 需要
--> 正在处理依赖关系 spax,它被软件包 redhat-lsb-core-4.1-27.el7.centos.1.x86_64 需要
--> 正在处理依赖关系 /usr/bin/patch,它被软件包 redhat-lsb-core-4.1-27.el7.centos.1.x86_64 需要
--> 正在处理依赖关系 /usr/bin/m4,它被软件包 redhat-lsb-core-4.1-27.el7.centos.1.x86_64 需要
--> 正在检查事务
---> 软件包 m4.x86_64.0.1.4.16-10.el7 将被 安装
---> 软件包 patch.x86_64.0.2.7.1-12.el7_7 将被 安装
---> 软件包 redhat-lsb-submod-security.x86_64.0.4.1-27.el7.centos.1 将被 安装
---> 软件包 spax.x86_64.0.1.5.2-13.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
==============================================================================================
Package 架构 版本 源 大小
==============================================================================================
正在安装:
tableau-server-20221.22.0516.1720
x86_64 20221-22.0516.1720 /tableau-server-2022-1-2.x86_64 5.1 G
为依赖而安装:
chrpath x86_64 0.16-0.el7 base 26 k
freeglut x86_64 3.0.0-8.el7 base 185 k
m4 x86_64 1.4.16-10.el7 base 256 k
patch x86_64 2.7.1-12.el7_7 base 111 k
redhat-lsb-core x86_64 4.1-27.el7.centos.1 base 38 k
redhat-lsb-submod-security x86_64 4.1-27.el7.centos.1 base 15 k
spax x86_64 1.5.2-13.el7 base 260 k
事务概要
==============================================================================================
安装 1 软件包 (+7 依赖软件包)
总计:5.1 G
总下载量:891 k
安装大小:5.1 G
Downloading packages:
警告:/var/cache/yum/x86_64/7/base/packages/m4-1.4.16-10.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
m4-1.4.16-10.el7.x86_64.rpm 的公钥尚未安装
(1/7): m4-1.4.16-10.el7.x86_64.rpm | 256 kB 00:00:02
(2/7): patch-2.7.1-12.el7_7.x86_64.rpm | 111 kB 00:00:02
(3/7): redhat-lsb-submod-security-4.1-27.el7.centos.1.x86_64.rpm | 15 kB 00:00:00
(4/7): redhat-lsb-core-4.1-27.el7.centos.1.x86_64.rpm | 38 kB 00:00:02
(5/7): chrpath-0.16-0.el7.x86_64.rpm | 26 kB 00:00:02
(6/7): spax-1.5.2-13.el7.x86_64.rpm | 260 kB 00:00:00
(7/7): freeglut-3.0.0-8.el7.x86_64.rpm | 185 kB 00:00:02
----------------------------------------------------------------------------------------------
总计 306 kB/s | 891 kB 00:00:02
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
用户ID : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
指纹 : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
软件包 : centos-release-7-9.2009.0.el7.centos.x86_64 (@anaconda)
来自 : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : freeglut-3.0.0-8.el7.x86_64 1/8
正在安装 : m4-1.4.16-10.el7.x86_64 2/8
正在安装 : spax-1.5.2-13.el7.x86_64 3/8
正在安装 : redhat-lsb-submod-security-4.1-27.el7.centos.1.x86_64 4/8
正在安装 : patch-2.7.1-12.el7_7.x86_64 5/8
正在安装 : redhat-lsb-core-4.1-27.el7.centos.1.x86_64 6/8
正在安装 : chrpath-0.16-0.el7.x86_64 7/8
Your hardware meets the minimum requirements for a trial of Tableau Server.
If you plan to run Tableau Server in a production environment, we recommend the following hardware specifications: http://www.tableau.com/products/server/specs
Tableau Server runs best with at least 64 GB memory, but found only 16 GB of memory.
Tableau Server runs best with at least 8 cores, but found only 6 core(s).
正在安装 : tableau-server-20221.22.0516.1720-20221-22.0516.1720.x86_64 8/8
Creating /usr/lib64/libcrypt.so (a workaround for some RHEL 7-based installations)
If this is a single node or initial node installation, run:
sudo /opt/tableau/tableau_server/packages/scripts.20221.22.0516.1720/initialize-tsm --accepteula
to continue setting up Tableau Server. If this installation is part of a multi-node configuration,
see the online documentation for installing Tableau Server on additional nodes.
验证中 : chrpath-0.16-0.el7.x86_64 1/8
验证中 : patch-2.7.1-12.el7_7.x86_64 2/8
验证中 : tableau-server-20221.22.0516.1720-20221-22.0516.1720.x86_64 3/8
验证中 : redhat-lsb-submod-security-4.1-27.el7.centos.1.x86_64 4/8
验证中 : spax-1.5.2-13.el7.x86_64 5/8
验证中 : redhat-lsb-core-4.1-27.el7.centos.1.x86_64 6/8
验证中 : m4-1.4.16-10.el7.x86_64 7/8
验证中 : freeglut-3.0.0-8.el7.x86_64 8/8
已安装:
tableau-server-20221.22.0516.1720.x86_64 0:20221-22.0516.1720
作为依赖被安装:
chrpath.x86_64 0:0.16-0.el7
freeglut.x86_64 0:3.0.0-8.el7
m4.x86_64 0:1.4.16-10.el7
patch.x86_64 0:2.7.1-12.el7_7
redhat-lsb-core.x86_64 0:4.1-27.el7.centos.1
redhat-lsb-submod-security.x86_64 0:4.1-27.el7.centos.1
spax.x86_64 0:1.5.2-13.el7
完毕!
切换TSM目录启动TSM
cd /opt/tableau/tableau_server/packages/scripts.xxxxxxxxx
sudo ./initialize-tsm --accepteula
#初始化安装数据目录至自定义路径在某些更高的版本比如2020.3及以后的版本,需要直接在初始化命令添加一个不存在的目录,脚本会自行创建并赋予权限,无需手动执行下面更改权限的命令,比如:
sudo /opt/tableau/tableau_server/packages/scripts.20211.20.0326.1623/initialize-tsm --accepteula -d /data/tableau
执行环境变量 (必须执行)
source /etc/profile.d/tableau_server.sh
Web UI 配置
在浏览器访问https://ip:8850按照提示继续安装,安装至最后一步可能会出现要求创建Server账户管理员需要在本地进行
登陆界面使用安装用户admin及密码来登陆
登录后点击试用或者激活license,或者直接输入license也行
选择身份存储,这里选择的是本地
等待初始化完成,大概20分钟左右(这里不一定,有部分是根据配置来的)
返回命令行,继续执行相关命令
最后一步回到命令界面
登陆到TSM服务器
tsm login -u tsmuser
创建Server账户管理员和密码
tabcmd initialuser --server "localhost:80" --username "admin" --password "admin"
额外查看配置
配置本地防火墙
tsm topology list-ports
sudo systemctl start firewalld
sudo firewall-cmd --get-default-zone
sudo firewall-cmd --set-default-zone=public
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=8850/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-all
查看防火墙所有开放的端口
firewall-cmd --zone=public --list-ports
1、开放端口
firewall-cmd --zone=public --add-port=5672/tcp --permanent # 开放5672端口
firewall-cmd --zone=public --remove-port=5672/tcp --permanent #关闭5672端口
卸载及移除
卸载保留配置
https://onlinehelp.tableau.com/current/server-linux/zh-cn/uninstall_server.htm
完全移除
https://onlinehelp.tableau.com/current/server-linux/zh-cn/remove_tableau.htm
停用key后执行下列脚本
sudo /opt/tableau/tableau_server/packages/scripts.<version>/tableau-server-obliterate -y -y -y -l
驱动安装
注意:安装完成后还需要继续将驱动安装
2020.4之前安装必要的驱动
安装postgreSQL驱动(linux版本必须安装)
wget https://downloads.tableau.com/drivers/linux/yum/tableau-driver/tableau-postgresql-odbc-09.06.0500-1.x86_64.rpm
#安装pg驱动
sudo yum install tableau-postgresql-odbc-09.06.0500-1.x86_64.rpm
2020.4及以后安装必要的驱动
注意:如果提示找不到wget命令,
可以使用下面的命令安装wget sudo yum -y install wget 安装后重新用wget下载
#必须安装postgreSQL驱动
#下载pg驱动
wget -P /opt/tableau/tableau_driver/jdbc https://downloads.tableau.com/drivers/linux/postgresql/postgresql-42.2.14.jar
#放置驱动Jar包至指定位置
将下载的jar包放入一下指定的路径 (如果此文件夹尚不存在,您需要创建它。)
Windows:C:\Program Files\Tableau\Drivers
Mac:~/Library/Tableau/Drivers
Linux: /opt/tableau/tableau_driver/jdbc
#修改驱动权限
sudo chown tableau:tableau /opt/tableau/tableau_driver/jdbc/*