Introduction
CockroachDB is a distributed database with standard SQL for cloud applications. It stores copies of data in multiple locations to deliver speedy access. It is described as a scalable, consistently-replicated, transactional data store.
CockroachDB features database replication with strong consistency, SQL query language support, automated scaling and repairing, and high availability.
In this article, we will explain to you how to install CockroachDB on Ubuntu OS 20.04.
Install the CockroachDB
- Download the latest Cockroach tar file and move the unzipped cockroach directory to
/usr/local/bin
.
$ sudo curl https://binaries.cockroachdb.com/cockroach-v21.2.8.linux-amd64.tgz | tar -xz && sudo cp -i cockroach-v21.2.8.linux-amd64/cockroach /usr/local/bin/
- Create a new directory named cockroach in
/usr/loacl/lib/
.$ sudo mkdir -p /usr/local/lib/cockroach
- Copy both
libgeos.so
andlibeos_c.so
files to the newly created directory.
$ sudo cp -i cockroach-v21.2.8.linux-amd64/lib/libgeos.so /usr/local/lib/cockroach/
$ sudo cp -i cockroach-v21.2.8.linux-amd64/lib/libgeos_c.so /usr/local/lib/cockroach/
- CockroachDB is installed on the system. You can confirm the installation by checking the version using the below command.
$ cockroach version
Output