centos7安装tidb
时间: 2023-09-06 08:08:21 浏览: 107
1. 添加TiDB软件仓库
在CentOS 7系统中,使用以下命令添加TiDB软件仓库:
```
$ curl -O https://raw.githubusercontent.com/pingcap/tidb/master/tools/apt-repo/tidb-community-server.repo
$ sudo mv tidb-community-server.repo /etc/yum.repos.d/
```
2. 安装TiDB
执行以下命令,安装TiDB:
```
$ sudo yum install tidb-community-server
```
3. 启动TiDB
执行以下命令,启动TiDB:
```
$ sudo systemctl start tidb
```
4. 验证TiDB
执行以下命令,验证TiDB是否已经启动:
```
$ sudo systemctl status tidb
```
如果输出如下信息,则表示TiDB已经成功启动:
```
● tidb.service - TiDB
Loaded: loaded (/usr/lib/systemd/system/tidb.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2019-11-28 14:30:45 CST; 6s ago
Main PID: 15295 (tidb-server)
Tasks: 17 (limit: 32768)
Memory: 39.8M
CGroup: /system.slice/tidb.service
└─15295 /usr/bin/tidb-server -config /etc/tidb/tidb.toml
```
阅读全文