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兼容性的同时,解决了以往“砸钱堆硬件”都难以实现的简单性、维护性和扩展性。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章