In fact, the official website written very clearly, but still be a fool course it
https://www.cockroachlabs.com/docs/stable/install-cockroachdb-linux.html
- Preparing the Environment
-
& G ++ gcc
yum -y install gcc
yum -y install gcc-c ++
yum -y install gdb gdb // recommend installing a smoothly
if you source in the yum install package gcc version is too low, it is recommended with
https: //www.jianshu .com / p / e3be0ca1307c method of connecting inside look to upgrade -
Go
wget https://studygolang.com/dl/go1.12.5.linux-arm64.tar.gz
the tar -C / usr / local -zxvf go1.12.5.linux-arm64.tar.gz
configure the environment variables
vi / etc / Profile
// add the last line
Export GOROOT = / usr / local / Go
Export the PATH = GOROOT / bin
after // wq save and exit source at
source / etc / profile
Reference:https://studygolang.com/articles/13957?fr=sidebar -
Bash
yum -y install bash -
cmake
yum List | grep cmake
find the above statement can be installed with version 3.1 or higher must pay attention to cmake, the official website of recommendation 3.8.1
If the above statement is find the right version, you can specify the installation package yum -y install directly
If you do not find a suitable, You need to manually install-
Delete the original cmake
yum -y autoremove cmake [caution, may later have problems then yum install] -
Official website to download the appropriate installation package
-
Extract to / usr / local /, and then modify / etc / procfile, add the path cmake in the last path path, and then click procfile source file
Or look http://blog.csdn.net/hometing218/article/details/79516686 inside this installation method
-
-
Autoconf
yum -y install autoconf
-
bison
yum -y install bison
-
ncurses
yum -y install ncurses-devel
yum -y install ncurses-static(Ubantu:apt-get install libncurses5-dev)
-
nodejs
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs
参考:
https://github.com/nodesource/distributions -
yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum install -y yarn
-
make build
wget -qO- https://binaries.cockroachdb.com/cockroach-v19.1.1.src.tgz | tar xvz
cd cockroach-v19.1.1
make build
-
attention! !
In general, you need to set GOPATH, this environment variable specifies the path to the current code, go, go in general need to put your code into $ GOPATH / src / github.com / XXXX
where XXXX in Benpian it is cockroachDB directory
of course GOPATH you can set in / etc / profile Lane, also each own export
然后就可以安装dlv调试代码,https://github.com/go-delve/delve/tree/master/Documentation 上面介绍的很详细
END
official website also has a corresponding compiled method, but some details still need to find the time of trial and error, step by step, such as ncurses installation
https://www.cockroachlabs.com/docs/stable/install-cockroachdb-linux.html