欢迎光临
我们一直在努力

TiDB rpm 安装方式

rpm/deb 或yum/apt 一直以来都是Linux 上最简单的软件安装方式。

由于TiDB 官方更推崇ansible/docker/k8s的安装方式,对于传统安装方式,官方仅仅给出了二进制安装文件,没有给出rpm 安装方式。

本着折腾的精神,我基于源码给TiDB 编译打包了一份rpm包,这是目前最简单快速的安装体验TiDB 的方法。

环境:CentOS 7

TiDB 版本:3.0.3

1、安装TiDB

yum-config-manager --add-repo http://purplegrape.github.io/public.repo 
yum install pd tikv tidb -y

2、启动服务

systemctl enable pd-server tikv-server tidb-server --now

3、安装mysql客户端

yum install mariadb -y

4、使用TiDB

mysql -u root  -P 4000
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.25-TiDB- MySQL Community Server (Apache License 2.0)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]>

在硬件条件相同的情况下,与MySQL 相比,TiDB 单机性能很低,在实际生产环境中,通常是以集群的方式使用。

TiDB 的优点在于保持MySQL兼容性的同时,解决了以往“砸钱堆硬件”都难以实现的简单性、维护性和扩展性。

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。