1. Install YugabyteDB
Prerequisites
-
macOS 10.12 or later.
-
Verify that you have Python 2 or 3 installed.
$ python --versionPython 3.7.3 -
wgetorcurlis available.The instructions use the
wgetcommand to download files. If you prefer to usecurl(included in macOS), you can replacewgetwithcurl -O.To install
wgeton your Mac, you can run the following command if you use Homebrew:$ brew install wget -
Each tablet maps to its own file, so if you experiment with a few hundred tables and a few tablets per table, you can soon end up creating a large number of files in the current shell. Make sure that this command shows a big enough value.
$ launchctl limit maxfilesWe recommend setting the soft and hard limits to 1048576.
Edit
/etc/sysctl.conf, if it exists, to include the following:kern.maxfiles=1048576 kern.maxproc=2500 kern.maxprocperuid=2500 kern.maxfilesperproc=1048576If this file does not exist, then create the file
/Library/LaunchDaemons/limit.maxfiles.plistand insert the following:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>limit.maxfiles</string> <key>ProgramArguments</key> <array> <string>launchctl</string> <string>limit</string> <string>maxfiles</string> <string>1048576</string> <string>1048576</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceIPC</key> <false/> </dict> </plist>Ensure that the
plistfile is owned byroot:wheeland has permissions-rw-r--r--. To take effect, you need to reboot your computer or run this command:$ sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plistYou might have to
unloadthe service before loading it.
Download YugabyteDB
-
Download the YugabyteDB
tar.gzfile using the followingwgetcommand.$ wget https://downloads.yugabyte.com/releases/2.11.2.0/yugabyte-2.11.2.0-b89-darwin-x86_64.tar.gz -
Extract the package and then change directories to the YugabyteDB home.
$ tar xvfz yugabyte-2.11.2.0-b89-darwin-x86_64.tar.gz && cd yugabyte-2.11.2.0/
Configure
Some of the examples in the Explore core features section require extra loopback addresses that allow you to simulate the use of multiple hosts or nodes.
To add six loopback addresses, run the following commands, which require sudo access.
sudo ifconfig lo0 alias 127.0.0.2
sudo ifconfig lo0 alias 127.0.0.3
sudo ifconfig lo0 alias 127.0.0.4
sudo ifconfig lo0 alias 127.0.0.5
sudo ifconfig lo0 alias 127.0.0.6
sudo ifconfig lo0 alias 127.0.0.7
Note: The loopback addresses do not persist upon rebooting of your Mac.
To verify that the extra loopback addresses exist, run the following command.
$ ifconfig lo0
You should see some output like the following:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.2 netmask 0xff000000
inet 127.0.0.3 netmask 0xff000000
inet 127.0.0.4 netmask 0xff000000
inet 127.0.0.5 netmask 0xff000000
inet 127.0.0.6 netmask 0xff000000
inet 127.0.0.7 netmask 0xff000000
nd6 options=201<PERFORMNUD,DAD>
Next step
Create a local cluster