TiDB¼¯Èº°²×° ÏÂÔر¾ÎÄ

±¾ÎÄÃèÊöTiDB×î¼òµ¥µÄ¼¯ÈºµÄÅäÖ÷½Ê½¡£

½Úµã

Õû¸ö¼¯Èº·Ö°üº¬4¸ö½Úµã£¬ÈçÏ£º

½Úµã debian0 debian1 debian2 debian3

IPµØÖ· 192.168.56.100 192.168.56.101 192.168.56.102 192.168.56.103 ·þÎñ pdserver + tidbserver tikvserver tikvserver tikvserver Èí¼þ»·¾³

ÐéÄâ»ú »úÆ÷Ãû³Æ Virtual debian0 Box debian1 debian2 debian3

ϵͳ Debian 8.6.0 64bit ÅäÖà CPU£ºµ¥ºË Äڴ棺1GB Ó²ÅÌ£º8G Ë«Íø¿¨ °²×° ½»»»¿Õ¼ä£º1GB boot·ÖÇø£º200MB Âß¼­·ÖÇø£º6.8GB Èí¼þ°²×°

TiDBͨ¹ýÍøÂç½øÐÐÔÚÏß°²×°¡£¸ù¾Ý¹Ù·½Îĵµ£¬Ö´ÐÐÏÂÁÐÃüÁ´ÓÍøÂç·þÎñÆ÷ÏÂÔØ×îÐµİ²×°°ü¡£

wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz

wget http://download.pingcap.org/tidb-latest-linux-amd64.sha256 Á½¸ö³ÌÐòÏÂÔØÍê³Éºó£¬Ö´ÐÐÏÂÁÐÃüÁî¶ÔÏÂÔØÎļþ½øÐÐÍêÕûÐÔ¼ì²é sha2sum -c tidb-latest-linux-amd64.sha256

¼ì²éÍêÕûÐԺ󣬻᷵»Øok£¬±íʾÕýÈ·¡£È»ºóͨ¹ýÒÔÏÂÃüÁî½âѹÎļþ¡£ tar -xzf tidb-latest-linux-amd64.tar.gz ½«½âѹºóµÄÎļþ¼ÐÒƶ¯µ½/usr/binÎļþ¼ÐÏ£º mv tidb-latest-linux-amd64 /usr/bin

µ½/usr/binÎļþ¼ÐÏ£¬ÐÞ¸Ätidb-latest-linux-amd64Îļþ¼ÐÃû³ÆΪtidb cd /usr/bin

mv tidb-latest-linux-amd64 tidb

ÎļþÅäÖÃ

ÓÃÏÂÁÐÃüÁî½øÈëdebian0½ÚµãµÄ/usr/bin/tidb/confÎļþ¼Ð²¢´ò¿ªpd.tomlÅäÖÃÎļþ¡£

cd /usr/bin/tidb/conf nano pd.toml Ч¹ûÈçÏ£º

ÐÞ¸ÄÏà¹ØÅäÖ㬾ßÌåÈçÏ£º name=¡±tidb_pd¡± data-dir=¡±/home/tidb¡±

client-urls=¡±http://192.168.56.100:2379¡± peer-urls=¡±http://192.168.56.100:2380¡±

advertise-peer-urls=¡±http://192.168.56.100:2380¡± initial-cluster=¡±tidb_pd=http://192.168.56.100:2380¡± ³ýÉÏÊöÄÚÈÝÍ⣬ÆäËûÅäÖÃÏî¾ù±£³ÖĬÈÏÖµ¡£