新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
TiDB初體驗(yàn)

部署TiDB就是擺在我們面前的第一節(jié)課,其實(shí)有很多的部署方式,限于環(huán)境,我先開(kāi)始琢磨單機(jī)版如何部署。
讓客戶(hù)滿(mǎn)意是我們工作的目標(biāo),不斷超越客戶(hù)的期望值來(lái)自于我們對(duì)這個(gè)行業(yè)的熱愛(ài)。我們立志把好的技術(shù)通過(guò)有效、簡(jiǎn)單的方式提供給客戶(hù),將通過(guò)不懈努力成為客戶(hù)在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:域名申請(qǐng)、虛擬主機(jī)、營(yíng)銷(xiāo)軟件、網(wǎng)站建設(shè)、六合網(wǎng)站維護(hù)、網(wǎng)站推廣。
在Centos 6的版本中如果要部署,這個(gè)難度還是比較大的,而且會(huì)有很多未知的坑,根據(jù)官方的建議,是需要在Centos 7以上的版本中,否則glibc的版本問(wèn)題會(huì)很快碰到。
我們安裝一套Centos7,采用快速的單機(jī)部署的方式來(lái)嘗鮮。
得到二進(jìn)制的包,大概是100多M.
[root@localhost ~]# wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz [root@localhost tidb]# wget http://download.pingcap.org/tidb-latest-linux-amd64.sha256 做信息匹配,查看文件的校驗(yàn)是否正確。 sha256sum -c tidb-latest-linux-amd64.sha256 解壓文件。 tar -xzf tidb-latest-linux-amd64.tar.gz [root@localhost tidb]# cd tidb-latest-linux-amd64 啟動(dòng)PD [root@localhost tidb-latest-linux-amd64]# ./bin/pd-server --data-dir=pd --log-file=pd.log & 關(guān)鍵的步驟來(lái)了,啟動(dòng)tikv,絕大多數(shù)的部署都是在這個(gè)步驟失敗。 [root@localhost tidb-latest-linux-amd64]# ./bin/tikv-server --pd="127.0.0.1:2379" --data-dir=tikv --log-file=tikv.log & 啟動(dòng)tidb-server [root@localhost tidb-latest-linux-amd64]# ./bin/tidb-server --store=tikv --path="127.0.0.1:2379" --log-file=tidb.log & 使用MySQL的方式來(lái)登錄: [root@localhost tidb-latest-linux-amd64]# mysql -h 127.0.0.1 -P 4000 -u root -D test Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.7.1-TiDB-v2.0.0-rc.1-6-ge38f406 MySQL Community Server (Apache License 2.0) Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 開(kāi)始體驗(yàn)一把 MySQL [test]> \s -------------- mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1 Connection id: 2 Current database: test Current user: [email protected] SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server: MySQL Server version: 5.7.1-TiDB-v2.0.0-rc.1-6-ge38f406 MySQL Community Server (Apache License 2.0) Protocol version: 10 Connection: 127.0.0.1 via TCP/IP Server characterset: latin1 Db characterset: utf8 Client characterset: utf8 Conn. characterset: utf8 TCP port: 4000 -------------- 查看對(duì)應(yīng)的數(shù)據(jù)庫(kù)列表。 MySQL [test]> show databases; +--------------------+ | Database | +--------------------+ | INFORMATION_SCHEMA | | PERFORMANCE_SCHEMA | | mysql | | test | +--------------------+ 4 rows in set (0.00 sec) MySQL [test]> select tidb_version(); +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tidb_version() | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Release Version: v2.0.0-rc.1-6-ge38f406 Git Commit Hash: e38f4067569152dd0acb233b4a8e0cc05644dee1 Git Branch: master UTC Build Time: 2018-03-11 08:28:59 GoVersion: go version go1.10 linux/amd64 TiKV Min Version: 1.1.0-dev.2 | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.04 sec) MySQL [test]> select version(); +-----------------------------------+ | version() | +-----------------------------------+ | 5.7.1-TiDB-v2.0.0-rc.1-6-ge38f406 | +-----------------------------------+ 1 row in set (0.00 sec) MySQL [test]> select user,host from mysql.user; +------+------+ | user | host | +------+------+ | root | % | +------+------+ 1 row in set (0.00 sec) MySQL [test]> show master status\G ERROR 1105 (HY000): line 1 column 11 near " status" (total length 18) MySQL [test]> show slave status\G ERROR 1105 (HY000): line 1 column 10 near " status" (total length 17) MySQL [test]> MySQL [test]> show binary logs; ERROR 1105 (HY000): line 1 column 11 near " logs" (total length 16) MySQL [test]> show variables like '%innodb%'; +------------------------------------------+------------------------+ | Variable_name | Value | +------------------------------------------+------------------------+ | innodb_locks_unsafe_for_binlog | OFF | | innodb_api_enable_mdl | OFF | | innodb_use_native_aio | OFF |
當(dāng)前名稱(chēng):TiDB初體驗(yàn)
標(biāo)題URL:http://fisionsoft.com.cn/article/godhig.html