喜乐君
Tableau咨询顾问、敏捷BI布道师,山东大学本硕,《数据可视化分析》《业务可视化分析》*4本书作者,连续创业者,Tableau Visionary 2021~2025
中国地质大学(武汉)经管学院 MBA 校外导师
以Tableau会友,致力于构建业务分析通识框架
XILEJUN.com 全球、XILEJUN.cn 中国
近年来,#Tableau Server 功能不断扩展,已集成可视化、数据管理、ETL等诸多功能于一体,越来越多人选择 Tableau Server 作为企业级 DW/BI 一体化平台。
Tableau Server 101:企业级DW/BI敏捷分析平台
https://xilejun.com/tableau-server-101/
为了帮助更多企业使用Tableau Server ,#喜乐君 以 Linux 环境为例,介绍服务器管理员如何完成 Server 单节点环境部署。
新环境安装部署
1 安装前:环境检查和准备
1.1 选择服务器操作系统
影响windows/Linux 要素可能有:数据库影响 Windows /Linux 选择,比如 DB2、SAP BW 等不支持 Linux;在同等服务器条件下,linux 优先于 Windows Server
1.2 确认服务器系统是否满足版本要求
1.2.1 服务器操作系统版本,比如 CentOS7.9
[admin@iZbp135ksu6rjy9gz0m6p1Z tableau]$ cat /etc/redhat-release
Rocky Linux release 9.5 (Blue Onyx)
1.2.2 服务器硬件信息,包括 CPU 核心数量、内存数量、硬盘空间等。
Tableau 程序默认安装在/opt 路径,文件目录在/var/opt 路径,请确保磁盘空间
1.3 网络相关
这一部分至关重要,安装程序之后 IP 地址和 hostname 不能修改,否则需要重装。
!!!云服务器的主机强烈建议修改 hostname 后安装,因为直接使用镜像制作的操作系统,常常出现一个局域网多个主机名称相同的情况。
1.3.1 如下是一个阿里云云服务器的默认主机信息:
[admin@iZbp135ksu6rjy9gz0m6p1Z logs]$ hostnamectl
Static hostname: iZbp135ksu6rjy9gz0m6p1Z
Icon name: computer-vm
Chassis: vm 🖴
Machine ID: 41dadc4b2515462f92f64f2a1c1a0861
Boot ID: 69cbf2296c614b71931b15f6859c0ac9
Virtualization: kvm
Operating System: Rocky Linux 9.5 (Blue Onyx)
CPE OS Name: cpe:/o:rocky:rocky:9::baseos
Kernel: Linux 5.14.0-503.31.1.el9_5.x86_64
Architecture: x86-64 Hardware
Vendor: Alibaba Cloud Hardware
Model: Alibaba Cloud ECS
Firmware Version: 0.0.0k
1.3.2 局域网可以确认一下 IP 地址,必要时需要确认 host 信息
[admin@iZbp135ksu6rjy9gz0m6p1Z logs]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.19.124.36 netmask 255.255.240.0 broadcast 172.19.127.255
inet6 fe80::216:3eff:fe3a:a3ca prefixlen 64 scopeid 0x20<link>
ether 00:16:3e:3a:a3:ca txqueuelen 1000 (Ethernet)
RX packets 3669909 bytes 5468625584 (5.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 863615 bytes 91518066 (87.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
像下面的 hostname 就存在问题,没有建立上面内网地址和 hostname 的映射关系。
[admin@iZbp135ksu6rjy9gz0m6p1Z logs]$ tail /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
[admin@iZbp135ksu6rjy9gz0m6p1Z logs]$
1.3.3 建议禁用 IPV6 ,Tableau Server 只使用 IPV4地址。
如果有多个网卡,建议保留一个。
1.3.4 防火墙
查看防火墙状态:firewall - - list-all
建议安装前临时关闭防火墙: sudo systemctl stop firewalld
Tableau 默认使用80端口,管理端使用8850.
1.4 用户准备(不要使用 root)
全新环境,建议新建用户用于安装,不要使用 root 账户!
可以使用 root 账号,把新账号增加到wheel 组:
[root@tableau data]# useradd tabadmin
[root@tableau data]# gpasswd -a admin wheel
Adding user admin to group wheel [root@tableau data]#
【确认】检查 admin 对应的用户组:
[admin@tableau data]$ groups admin
admin : admin wheel
[admin@tableau data]$
修改 /etc/sudoers文件并,增加 sudo 权限。
[root@tableau data]# vi /etc/sudoers
root ALL=(ALL) ALL(这一段后面增加)
admin ALL=(ALL) ALL
1.5 建议部署前升级环境
[admin@server home]$ sudo yum update
[sudo] password for admin:
Last metadata expiration check: 3:31:55 ago on Tue 22 Apr 2025 05:46:24 PM CST.
Dependencies resolved.
===========================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================
Installing:
kernel x86_64 5.14.0-503.38.1.el9_5 baseos 2.0 M
kernel-core x86_64 5.14.0-503.38.1.el9_5 baseos 18 M
kernel-devel x86_64 5.14.0-503.38.1.el9_5 appstream 18 M
kernel-modules x86_64 5.14.0-503.38.1.el9_5 baseos 36 M
kernel-modules-core x86_64 5.14.0-503.38.1.el9_5 baseos 30 M
Upgrading:
bpftool x86_64 7.4.0-503.38.1.el9_5
……
Upgraded:
bpftool-7.4.0-503.38.1.el9_5.x86_64 expat-2.5.0-3.el9_5.3.x86_64
freetype-2.10.4-10.el9_5.x86_64 kernel-headers-5.14.0-503.38.1.el9_5.x86_64
kernel-tools-5.14.0-503.38.1.el9_5.x86_64 kernel-tools-libs-5.14.0-503.38.1.el9_5.x86_64
python3-jinja2-2.11.3-8.el9_5.noarch python3-perf-5.14.0-503.38.1.el9_5.x86_64
rocky-gpg-keys-9.5-1.3.el9.noarch rocky-release-9.5-1.3.el9.noarch
rocky-repos-9.5-1.3.el9.noarch tzdata-2025b-1.el9.noarch
webkit2gtk3-jsc-2.48.1-1.el9_5.x86_64
Installed:
kernel-5.14.0-503.38.1.el9_5.x86_64 kernel-core-5.14.0-503.38.1.el9_5.x86_64
kernel-devel-5.14.0-503.38.1.el9_5.x86_64 kernel-modules-5.14.0-503.38.1.el9_5.x86_64
kernel-modules-core-5.14.0-503.38.1.el9_5.x86_64
Complete!
[admin@iZbp135ksu6rjy9gz0m6p1Z home]$
2 准备安装文件
使用wget 下载,确保 admin 具有权限。
如果使用 root 下载,文件的所有者在 root 之中,后期会出现 admin 无法访问的过程。
3 安装主程序
3.1 安装 Tableau-server 主程序
使用 -y 可以免于多次确认。
[admin@iZbp135ksu6rjy9gz0m6p1Z home]$ ll
total 2734028
drwx------ 2 admin admin 83 Apr 22 12:37 admin
-rw-r--r-- 1 admin admin 2799643563 Apr 10 05:36 tableau-server-2023-3-16.x86_64.rpm
[admin@iZbp135ksu6rjy9gz0m6p1Z home]$ sudo yum install tableau-server*
Last metadata expiration check: 3:36:34 ago on Tue 22 Apr 2025 05:46:24 PM CST.
Dependencies resolved.
========================================================================================================
Package Architecture Version Repository Size
========================================================================================================
Installing:
tableau-server-20233.25.0325.1434 x86_64 20233-25.0325.1434 @commandline 2.6 G
Installing dependencies:
boost-regex x86_64 1.75.0-8.el9 appstream 277 k
chrpath x86_64 0.16-17.el9 baseos 29 k
fuse x86_64 2.9.9-16.el9 baseos 78 k
fuse-common x86_64
………………
Installing weak dependencies:
mesa-dri-drivers x86_64 24.1.2-3.el9 appstream 8.8 M
Transaction Summary
========================================================================================================
Install 36 Packages
Total size: 2.6 G
Total download size: 42 M
Installed size: 4.8 G
Is this ok [y/N]: y
Downloading Packages:
(1/35): fuse-2.9.9-16.el9.x86_64.rpm 963 kB/s | 78 kB 00:00
(2/35): libpciaccess-0.16-7.el9.x86_64.rpm 268 kB/s | 26 kB 00:00
(3/35): fuse-common-3.10.2-9.el9.x86_64.rpm 211 kB/s | 7.3 kB 00:00
(4/35): libxshmfence-1.3-10.el9.x86_64.rpm 422 kB/s | 12 kB 00:00
……
Installed:
boost-regex-1.75.0-8.el9.x86_64 chrpath-0.16-17.el9.x86_64 fuse-2.9.9-16.el9.x86_64 fuse-common-3.10.2-9.el9.x86_64
gdb-14.2-3.el9.x86_64 gdb-headless-14.2-3.el9.x86_64 libICE-1.0.10-8.el9.x86_64 libX11-xcb-1.7.0-9.el9.x86_64
libXcomposite-0.4.5-7.el9.x86_64 libXcursor-1.2.0-7.el9.x86_64 libXdamage-1.1.5-7.el9.x86_64 libXfixes-5.0.3-16.el9.x86_64
libXi-1.7.10-8.el9.x86_64 libXrandr-1.5.2-8.el9.x86_64 libXtst-1.2.3-16.el9.x86_64 libXxf86vm-1.1.4-18.el9.x86_64
libbabeltrace-1.5.8-10.el9.x86_64 libdrm-2.4.121-1.el9.x86_64 libglvnd-1:1.3.4-1.el9.x86_64 libglvnd-egl-1:1.3.4-1.el9.x86_64
libglvnd-glx-1:1.3.4-1.el9.x86_64 libipt-2.0.4-5.el9.x86_64 libpciaccess-0.16-7.el9.x86_64 libwayland-client-1.21.0-1.el9.x86_64
libwayland-server-1.21.0-1.el9.x86_64 libxshmfence-1.3-10.el9.x86_64 libxslt-1.1.34-9.el9_5.2.x86_64 llvm-libs-18.1.8-3.el9.x86_64
mesa-dri-drivers-24.1.2-3.el9.x86_64 mesa-filesystem-24.1.2-3.el9.x86_64 mesa-libEGL-24.1.2-3.el9.x86_64 mesa-libGL-24.1.2-3.el9.x86_64
mesa-libgbm-24.1.2-3.el9.x86_64 mesa-libglapi-24.1.2-3.el9.x86_64 source-highlight-3.1.9-12.el9.x86_64 tableau-server-20233.25.0325.1434-20233-25.0325.1434.x86_64
Complete!
(部分版本)安装成功后,提示初始化 tsm 的路径和命令。
If this is a single node or initial node installation, run:
sudo /opt/tableau/tableau_server/packages/scripts.20242.24.1112.0335/initialize-tsm --accepteula
3.2 初始化 TSM 管理服务
注意,初始化 TSM 和后续初始化服务器是两个关键环节。
切换到指定路径并初始化sudo ./initialize-tsm ,初始化 TSM 时,必备参数是--accepteula,默认激活 ATR(--activation-service)。
自 Tableau Server 2021.4 及更高版本起,--activation-service选项是 Microsoft Windows 版 Tableau Server、Linux 版 Tableau Server 和容器中的 Tableau Server 的默认值。
服务器 ATR 仅用于全安装,不适用于升级。选择 ATR 进行产品激活是一种永久的选择,以后无法撤消。
[admin@tabserver opt]$ sudo /opt/tableau/tableau_server/packages/scripts.20233.25.0325.1434/initialize-tsm --accepteula --activation-service
Creating 'tsmadmin' group for TSM admin authorization
Creating 'tableau' unprivileged user account
Creating environment file...
Creating directories and setting permissions...
Using '/var/opt/tableau/tableau_server' as the data directory.
Adding user 'admin' to group 'tableau'...
Adding user 'admin' to group 'tsmadmin'...
Added. Note: These group membership changes do not take effect in shells already open. For these to take effect, log out of the shell and log back in.
Starting TSM services...
Updating repository version in Tableau Server Coordination Service.
TSM services started successfully
Use the 'tsm' command to continue setting up Tableau Server.
>> Tableau binary directory will be added to PATH for new shells. To get the
>> updated path, either start a new session, or for bash users run:
>> source /etc/profile.d/tableau_server.sh
The TSM administrative web interface (and REST API) is now available at
<https://tabserver:8850>
You can continue the configuration and initialization of Tableau server using either the TSM command line interface,
or the web interface.
You will be prompted to authenticate, or can log in using the username 'admin', with the same password you used to log into this session. You could also use any username, with its password, from the administrative group in the domain.
Done.
[admin@tabserver opt]$
如果指定路径安装,使用-d 指定路径。要注意,指定路径必须在这个环节完成,安装后不能修改。
更多参数,参考https://help.tableau.com/current/server-linux/en-us/setup.htm
可能的问题:
自定义路径没有权限,比如/data/路径默认是 root 创建的,但是特权账号无法访问。此时,需要使用 chown 账号修改文件夹的权限。
4 TableauServer 激活、注册和初始化
可以继续使用命令,也可以使用浏览器访问8850端口完成进一步的激活、注册和初始化程序。
4.1 登录8850
如果无法打开8850,请注意:必须使用 https 访问; 确保防火墙没有禁止。
使用在前面安装时创建的admin账号和密码登录。
4.2 激活许可证
在命令中,可以使用tsm licenses activate -k KEY完成激活,或者使用UI 界面
[admin@tabserver root]$ tsm licenses activate -k TS6O-BE0F-6EA0-AE72-F339
License key activated.
必要时取消激活,避免许可证超量 tsm licenses deactivate
4.3 注册信息
联系人、公司信息、地址等
如果不能使用浏览器登录,可以 tsm 导入,但不推荐,除非是高手。
[admin@tabserver root]$ cd /home/admin
[admin@tabserver ~]$ ls
[admin@tabserver ~]$ touch registration.json
[admin@tabserver ~]$ vi registration.json
[admin@tabserver ~]$ tsm register --file /home/admin/registration.json
Registration complete.
[admin@tabserver ~]$
4.4 配置用户
身份存储二选一,且安装之后不能修改。
不能使用 UI,就需要使用命令导入,难度很高,推荐查看官方文档:
参考官方文档:https://help.tableau.com/current/server/en-us/entity_identity_store.htm
4.5 初始化
初始化是最容易出错的环节,通过之后,基本就安装完成。
对应命令 tsm initialize --start-server --request-timeout 1800,可以终端替代,但通常没有必要。
[admin@tabserver ~]$ tsm initialize --start-server --request-timeout 1800
Initializing the server...
Job id is '1', timeout is 30 minutes.
2% - Checking control plane services.
4% - Validating that there are no pending changes.
7% - Setting the default identity services tables.
9% - Generating new asset key.
12% - Saving asset key.
14% - Generating passwords.
17% - Generating secret keys.
19% - Generating apigateway mutual SSL certificates.
21% - Generating Apache Gateway Internal mutual SSL certificates.
24% - Generating Unique Cluster Identifier.
26% - Generating Index And Search Server SSL certificate.
29% - Generating ActiveMQ Server SSL certificate.
31% - Generating internal Metadata API mutual SSL certificates.
34% - Generating key store.
36% - Generating Hyper SSL certificate.
39% - Generating TSIG logs service SSL certificate.
41% - Promoting configuration.
43% - Waiting for services to reconfigure.
46% - Initializing the topology. 48% - Waiting for the maintenance app to start.
51% - Initializing the temporary database instance.
53% - Starting the temporary database instance.
56% - Creating roles and databases.
58% - Running migrations.
60% - Localizing the default projects.
63% - Stopping the temporary database instance.
65% - Making the temporary database default.
68% - Initializing the next active repository.
70% - Enabling services needed for server initialization.
73% - Connecting to the Backup/Restore service.
75% - Saving asset key metadata.
78% - Connecting to the Backup/Restore service.
Running - Initializing Index And Search Server.
80% - Initializing Index And Search Server.
Running - Finalizing the topology.
82% - Finalizing the topology.
85% - Connecting to Vizportal Maintenance.
87% - Rebuilding the search index.
100% - Finalizing the initialization.
4.5 创建服务器管理员
这一步是本环节中唯一必须使用命令完成的。
[admin@tabserver ~]$ tabcmd initialuser --server <http://localhost> --username admin
Password:
===== redirecting to <http://localhost/auth>
===== Signed out
===== Creating new session
===== Server: <http://localhost>
===== Username: admin
===== Connecting to the server...
===== Signing in...
===== Succeeded
[admin@tabserver ~]$
如果在 80 以外的端口上运行 HTTP 协议,请在主机名之后指定端口,例如:--server http://localhost:8080。
运行该命令之后,shell 将提示输入管理密码。
4.6 启动服务器
tsm start
5 部署之后服务器配置
部署完成后,通常需要修改拓扑,配置 SMTP,安装驱动等。
5.1 修改拓扑
5.2 完善邮箱和通知信息 (可选)
5.3 配置 Catalog是否有 DM (可选)
许可证,如果有,企业的 Catalog 服务。启用 Catalog 服务:
运行tsm maintenance metadata-services 命令来启用 Tableau 元数据 API。运行该命令将开始初始建立索引、并打开 Catalog。
在群集中的初始节点(安装了 TSM 的节点)上以管理员身份打开命令提示符。运行命令:tsm maintenance metadata-services enable, 如下所示:
5.4 驱动安装(省略)
注意,linux 新环境需要自己新建 tableau_driver路径。
Tableau 管理视图需要 Postgresql 驱动,其他根据环境需要自己配置。
详见 tableau.com/support/drivers
5.5 服务器自定义:修改网站的 logo,以及名称等
可以参考博客 https://xilejun.com/tableau/tableau-server101-tableau_server_customize-logo/
[admin@tabserver ~]$ tsm customize --header-logo wdbaby_logo.png
Uploading file(s) [wdbaby_logo.png] to the controller. This may take a few seconds....
Files uploaded successfully.
Customization information set.
[admin@tabserver ~]$ tsm customize --server-name 公司BI平台
Customization information set.
6 其他
具有 AM 许可证的用户,可以根据需要安装tsig独立网关。
比如,喜乐君通常将独立网关和 Tableau 门户系统单独部署,这样能有效提高安全性,特别是云服务而言。
更多内容,欢迎参见 xilejun.com 博客 。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有