Install YugabyteDB

AttentionThis page documents an earlier version. Go to the latest (v2.1)version.

Prerequisites

a) macOS 10.12 (Sierra) or higher

b) Verify that you have python2 installed. Support for python3 is in the works.

  1. $ python --version
  1. Python 2.7.10

c) Make sure that your file limits for kern.maxfiles and kern.maxfilesperproc are 1048576. Edit/etc/sysctl.conf on High Sierra if necessary

Download

Download the YugabyteDB CE package as shown below.

  1. $ wget https://downloads.yugabyte.com/yugabyte-ce-1.0.7.0-darwin.tar.gz
  1. $ tar xvfz yugabyte-ce-1.0.7.0-darwin.tar.gz && cd yugabyte-1.0.7.0/

Configure

Setup loopback IP addresses on your localhost so that every node in the 3 node local cluster gets a unique IP address of its own.

  1. $ sudo ifconfig lo0 alias 127.0.0.2
  2. $ sudo ifconfig lo0 alias 127.0.0.3

Add some more loopback IP addresses to cover the add node scenarios of the Explore Core Features section.

  1. $ sudo ifconfig lo0 alias 127.0.0.4
  2. $ sudo ifconfig lo0 alias 127.0.0.5
  3. $ sudo ifconfig lo0 alias 127.0.0.6
  4. $ sudo ifconfig lo0 alias 127.0.0.7

Prerequisites

a) One of the following operating systems

CentOS 7

Ubuntu 16.04+

b) Verify thatyou have python2 installed. Support for python3 is in the works.

  1. $ python --version
  1. Python 2.7.10

Download

Download the YugabyteDB CE package as shown below.

  1. $ wget https://downloads.yugabyte.com/yugabyte-ce-1.0.7.0-linux.tar.gz
  1. $ tar xvfz yugabyte-ce-1.0.7.0-linux.tar.gz && cd yugabyte-1.0.7.0/

Configure

  1. $ ./bin/post_install.sh

NOTE:The Docker option to run local clusters is recommended only for advanced Docker users. This is because running stateful apps like YugabyteDB in Docker is more complex and error-prone than the more common stateless app use cases.

Prerequisites

a) You must have the Docker runtime installed on your localhost. Follow the links below to download and install Docker if you have not done so already.

Docker for Mac

Docker for CentOS

Docker for Ubuntu

Docker for Debian

Docker for Windows

b) Verify that you have python2 installed. Support for python3 is in the works.

  1. $ python --version
  1. Python 2.7.10

Download

Download the yb-docker-ctl utility. This utility has a set of pre-built commands to create and thereafter administer a containerized local cluster.

  1. $ mkdir ~/yugabyte && cd ~/yugabyte
  1. $ wget https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/bin/yb-docker-ctl && chmod +x yb-docker-ctl

Install

Confirm that Docker and python are installed correctly.

  1. $ docker ps
  1. $ python --version

Pull the YugabyteDB container.

  1. $ docker pull yugabytedb/yugabyte:1.0.7.0-b13

Prerequisites

You must have Minikube installed on your localhost. Follow these instructions to install Minikube along with its pre-requisites.

We will be using the StatefulSets workload API of Kubernetes, so you should have a version that supports this (preferably 1.8+). Run the version commands as shown below to verify the version.

  1. $ minikube version
  1. minikube version: v0.25.0

Start Kubernetes

Start Kubernetes via Minikube with the following command.

  1. $ minikube start

Review Kubernetes dashboard with the following command.

  1. $ minikube dashboard

Also confirm that your kubectl is configured correctly.

  1. $ kubectl version
  1. Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", …}
  2. Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", …}

Download

Download yugabyte-statefulset.yaml. This will create a local YugabyteDB cluster on Kubernetes with a replication factor of 3.

  1. $ mkdir ~/yugabyte && cd ~/yugabyte
  1. $ wget https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/cloud/kubernetes/yugabyte-statefulset.yaml