我要评分
获取效率
正确性
完整性
易理解

Compiling and Installing TiDB

  1. Obtain the TiDB source package.
    1
    2
    3
    4
    cd /home/
    git clone https://github.com.cnpmjs.org/pingcap/tidb.git
    cd tidb/
    git checkout v3.0.13
    
  2. Compile and install TiDB.
    1. Edit the go.mod file and comment out line 17. The resource address is in line 18.
      1
      vi go.mod
      

    2. Edit the go.mod file. Because golang.org/x/text cannot access the resource, add the following content to line 77:
      1
      replace golang.org/x/text => github.com/golang/text v0.3.0
      

    3. Perform the compilation.
      1
      gmake