当前位置:网站首页>TiUP 简介
TiUP 简介
2022-07-30 14:50:00 【添香小铺】
在各种系统软件和应用软件的安装管理中,包管理器均有着广泛的应用,包管理工具的出现大大简化了软件的安装和升级维护工作。例如,几乎所有使用 RPM 的 Linux 都会使用 yum 来进行包管理,而 Anaconda 则可以非常方便地管理 Python 的环境和相关软件包。
在早期的 TiDB 生态中,没有专门的包管理工具,使用者只能通过相应的配置文件和文件夹命名来手动管理,如 Prometheus 等第三方监控报表工具甚至需要额外的特殊管理,这样大大提升了运维管理难度。
从 TiDB 4.0 版本开始,TiUP 作为新的工具,承担着包管理器的角色,管理着 TiDB 生态下众多的组件,如 TiDB、PD、TiKV 等。用户想要运行 TiDB 生态中任何组件时,只需要执行 TiUP 一行命令即可,相比以前,极大地降低了管理难度。
安装 TiUP
TiUP 安装过程十分简洁,无论是 Darwin 还是 Linux 操作系统,执行一行命令即可安装成功:
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
该命令将 TiUP 安装在 $HOME/.tiup 文件夹下,之后安装的组件以及组件运行产生的数据也会放在该文件夹下。同时,它还会自动将 $HOME/.tiup/bin 加入到 Shell Profile 文件的 PATH 环境变量中,这样你就可以直接使用 TiUP 了。
例如,你可以查看 TiUP 的版本:
tiup --version
注意
TiUP 默认会收集使用情况信息,并将这些信息分享给 PingCAP 用于改善产品。若要了解所收集的信息详情及如何禁用该行为,请参见遥测。
TiUP 生态介绍
TiUP 的直接功能是作为 TiDB 生态中的包管理器,但这并不是它的最终使命。TiUP 的愿景是将 TiDB 生态中所有工具的使用门槛降到极致,这个仅仅靠包管理功能是做不到的,还需要引入一些额外的包来丰富这个系统,它们一起加入到 TiUP 生态中,让 TiDB 的世界变得更简单。
TiUP 系列文档的主要内容就是介绍 TiUP 及这些包的功能和使用方式。
在 TiUP 生态中,你可以通过在任何命令后加上 --help 的方式来获得帮助信息,比如通过以下命令获取 TiUP 本身的帮助信息:
tiup --help
TiUP is a command-line component management tool that can help to download and install TiDB platform components to the local system. You can run a specific version of a component via "tiup <component>[:version]". If no version number is specified, the latest version installed locally will be used. If the specified component does not have any version installed locally, the latest stable version will be downloaded from the repository. Usage: tiup [flags] <command> [args...] tiup [flags] <component> [args...] Available Commands: install Install a specific version of a component list List the available TiDB components or versions uninstall Uninstall components or versions of a component update Update tiup components to the latest version status List the status of instantiated components clean Clean the data of instantiated components mirror Manage a repository mirror for TiUP components help Help about any command or component Components Manifest: use "tiup list" to fetch the latest components manifest Flags: -B, --binary <component>[:version] Print binary path of a specific version of a component <component>[:version] and the latest version installed will be selected if no version specified --binpath string Specify the binary path of component instance -h, --help help for tiup --skip-version-check Skip the strict version check, by default a version must be a valid SemVer string -T, --tag string Specify a tag for component instance -v, --version version for tiup Component instances with the same "tag" will share a data directory ($TIUP_HOME/data/$tag): $ tiup --tag mycluster playground Examples: $ tiup playground # Quick start $ tiup playground nightly # Start a playground with the latest nightly version $ tiup install <component>[:version] # Install a component of specific version $ tiup update --all # Update all installed components to the latest version $ tiup update --nightly # Update all installed components to the nightly version $ tiup update --self # Update the "tiup" to the latest version $ tiup list # Fetch the latest supported components list $ tiup status # Display all running/terminated instances $ tiup clean <name> # Clean the data of running/terminated instance (Kill process if it's running) $ tiup clean --all # Clean the data of all running/terminated instances Use "tiup [command] --help" for more information about a command.
输出的帮助信息较长,你可以只关注两部分:
- 可用的命令
- install:用于安装组件
- list:查看可用组件列表
- uninstall:卸载组件
- update:更新组件版本
- status:查看组件运行记录
- clean:清除组件运行记录
- mirror:从官方镜像克隆一个私有镜像
- help:输出帮助信息
- 可用的组件
- playground:在本机启动集群
- client:连接本机的集群
- cluster:部署用于生产环境的集群
- bench:对数据库进行压力测试
注意
- 可用的组件会持续增加,以
tiup list输出结果为准。 - 组件的可用版本列表也会持续增加,以
tiup list <component>输出结果为准。
命令和组件的区别在于,命令是 TiUP 自带的,用于进行包管理的操作。而组件是 TiUP 通过包管理操作安装的独立组件包。比如执行 tiup list 命令,TiUP 会直接运行自己内部的代码,而执行 tiup playground 命令则会先检查本地有没有叫做 playground 的组件包,若没有则先从镜像上下载过来,然后运行这个组件包。
边栏推荐
- 71-page comprehensive overall solution for global tourism 2021 ppt
- 有关收集箱的改进建议
- Use of SLF4J
- Flink实时仓库-DWS层(状态编程,windowall的使用,数据保存到clickhouse)模板代码
- ISELED---氛围灯方案的新选择
- Distributed pre-course: MySQL implements distributed locks
- B+树索引页大小是如何确定的?
- How is the B+ tree index page size determined?
- QIIME2得到PICRUSt2结果后如何分析
- Lock wait timeout exceeded solution
猜你喜欢

超T动力 盈运天下——中国重汽黄河/豪沃WP14T产品首发荣耀上市!

Our company has used gateway services for 6 years, dynamic routing, authentication, current limiting, etc., a stable batch!

基于5G的仓储信息化解决方案2022

GeoServer + openlayers

【云原生】服务行业案例-不可预测的并发场景解决方案

JVM performance tuning

Alluxio for Presto fu can across the cloud self-service ability

Mysql database query is very slow. Besides the index, what else can be caused?

Lock wait timeout exceeded解决方案

Excel uses Visual Basic Editor to modify macros
随机推荐
[Enlightenment by Opportunity-53]: "Sushu"-3- Self-cultivation and Self-cultivation
【云原生】阿里云ARMS业务实时监控
ECCV2022 | FPN错位对齐,实现高效半监督目标检测 (PseCo)
4 senior experts share the insider architecture design and implementation principles of Flink technology with years of experience in large factories
The evolution of content products has three axes: traffic, technology, and product form
Introduction to golang image processing library image
2022最新 | 室外单目深度估计研究综述
B+树索引页大小是如何确定的?
Lock wait timeout exceeded solution
让人上瘾的新一代开发神器,彻底告别Controller、Service、Dao等方法
In-depth analysis of Kubernetes application management
golang modules initialization project
SEATA distributed transaction
InputStream和OutputStream流的使用
使用 protobuf 进行数据序列化
v-model组件化编程应用
golang图片处理库image简介
【为宏正名】99%的人从第一天学习C语言就自废的武功
Flink optimization
Flink本地UI运行