You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _get_started/2_run_on_osx.md
+32-22Lines changed: 32 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -2,53 +2,63 @@
2
2
title: Run on OS X
3
3
---
4
4
5
-
There are four ways to install and run CockroachDB on OS X for local development and testing:
5
+
There are currently two ways to deploy CockroachDB locally on OSX:
6
6
7
7
-[Download the Binary](#download-the-binary)
8
-
-[Use Docker](#use-docker)
9
-
-[Use Homebrew](#use-homebrew)
10
8
-[Build from Source](#build-from-source)
11
9
12
10
## Download the Binary
13
11
14
-
## Use Docker
15
-
16
-
Docker provides an official CockroachDB image.
17
12
18
-
1.**Install Docker**
19
-
For a quick Docker install, run the following commands in your system shell. See [Docker's official documentation](https://docs.docker.com/engine/installation/mac/) for full installation instructions.
13
+
## Build from Source
20
14
21
-
```bash
15
+
1. Install the following prerequisites, as necessary:
16
+
- A C++ compiler that supports C++11 (GCC 4.9+ and clang 3.6+ are known to work). On Mac OS X, Xcode should suffice.
17
+
- A [Go environment](http://golang.org/doc/code.html) with a 64-bit version of Go 1.5. You can download the [Go binary](https://golang.org/dl/) directly from the official site. On OS X, you can also use [homebrew](http://brew.sh): `brew install go`.
The first time you run `make`, it can take some time to download and install various dependencies.
34
+
35
+
4. Start up a cluster:
37
36
38
37
```bash
39
-
$ docker pull cockroachdb/cockroach
38
+
$ ./cockroach start --dev &
40
39
```
41
40
42
-
3. **Start up the Cockroach shell**
41
+
## Use Docker
42
+
43
+
Deploying CockroachDB in Docker is quick and easy. Once you've installed Docker, just run Cockroach in the default Docker container.
44
+
45
+
1. [Install Docker](https://docs.docker.com/mac/step_one/), as described in Docker's installation instructions for OS X.
46
+
47
+
2. To start CockroachDB, run this commandin your terminal:
43
48
44
49
```bash
45
50
$ docker run -t -i cockroachdb/cockroach shell
46
-
# root@82cb657cdc42:/cockroach#
47
51
```
48
52
53
+
The first time you do this, Docker pulls the official CockroachDB image from Docker Hub. From that point on, the image remains on your local system. You can run `docker images` to list all of your local images.
49
54
50
-
## Build from Source
55
+
```bash
56
+
$ docker images
51
57
58
+
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
59
+
cockroachdb/cockroach latest e707dfaf8703 2 days ago 278.2 MB
Copy file name to clipboardExpand all lines: _site/get_started/run-on-os-x/index.html
+33-24Lines changed: 33 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -356,47 +356,56 @@ <h3>Get Started</h3>
356
356
</div>
357
357
<articleclass="content">
358
358
359
-
<p>There are four ways to install and run CockroachDB on OS X for local development and testing:</p>
359
+
<p>There are currently two ways to deploy CockroachDB locally on OSX:</p>
360
360
361
361
<ul>
362
362
<li><ahref="#download-the-binary">Download the Binary</a></li>
363
-
<li><ahref="#use-docker">Use Docker</a></li>
364
-
<li><ahref="#use-homebrew">Use Homebrew</a></li>
365
363
<li><ahref="#build-from-source">Build from Source</a></li>
366
364
</ul>
367
365
368
366
<h2id="download-the-binary">Download the Binary</h2>
369
367
370
-
<h2id="use-docker">Use Docker</h2>
371
-
372
-
<p>Docker provides an official CockroachDB image. </p>
368
+
<h2id="build-from-source">Build from Source</h2>
373
369
374
370
<ol>
375
-
<li><p><strong>Install Docker</strong><br>
376
-
For a quick Docker install, run the following commands in your system shell. See <ahref="https://docs.docker.com/engine/installation/mac/">Docker's official documentation</a> for full installation instructions. </p>
377
-
<divclass="highlight"><pre><codeclass="language-bash" data-lang="bash"><spanclass="c"># Install docker and docker-machine: </span>
<p>The first time you do this, Docker pulls the official CockroachDB image from Docker Hub. From that point on, the image remains on your local system. You can run <code>docker images</code> to list all of your local images.</p>
cockroachdb/cockroach latest e707dfaf8703 <spanclass="m">2</span> days ago 278.2 MB
405
+
hello-world latest 0a6ba66e537a <spanclass="m">9</span> weeks ago <spanclass="m">960</span> B
395
406
</code></pre></div></li>
396
407
</ol>
397
408
398
-
<h2id="build-from-source">Build from Source</h2>
399
-
400
409
<p>Random code sample:</p>
401
410
402
411
<divclass="highlight"><pre><codeclass="language-python" data-lang="python"><spanclass="k">print</span><spanclass="p">(</span><spanclass="s">'Welcome to the Pig Latin Translator!'</span><spanclass="p">)</span>
0 commit comments