|
| 1 | +--- |
| 2 | +id: getting-started |
| 3 | +title: Getting Started |
| 4 | +--- |
| 5 | + |
| 6 | +Getting started with Skytable is easy 😊 (and fun!). You can get started with [native binaries (recommended)](#get-started-with-bundles) or by using the [docker image](#get-started-with-docker). |
| 7 | + |
| 8 | +## Get started with bundles |
| 9 | + |
| 10 | +### Step 1: Download a bundle |
| 11 | + |
| 12 | +Head over to this [page](https://github.com/skytable/skytable/releases/v0.7.3) and download a version for your platform. |
| 13 | + |
| 14 | +:::tip Tip |
| 15 | +If you're on Debian, consider downloading an appropriate `.deb` (Debian Package) file for your machine. |
| 16 | +The package will install `skyd`, `skysh`, `sky-bench` and `sky-migrate` on your system while also |
| 17 | +configuring a `systemd` service unit. |
| 18 | +::: |
| 19 | + |
| 20 | +### Step 2: Make the files runnable |
| 21 | + |
| 22 | +Unzip the `zip` file that you just downloaded. If you're on a \*nix system, run `chmod +x skyd skysh` to make the files executable. If you're on Windows, right-click the files and then check the `UNBLOCK` checkbox and click on the `APPLY` button. |
| 23 | + |
| 24 | +### Step 3: Start the database server |
| 25 | + |
| 26 | +In the directory where you extracted the files, run `./skyd` on \*nix systems or simply `skyd` on Windows systems. That's all there is to starting the database server! |
| 27 | + |
| 28 | +### Step 4: Run the shell `skysh` |
| 29 | + |
| 30 | +`skysh` is the shell that is shipped with the bundle. Run it, just like you did with the database server. Now enter commands in the shell, and have fun! First run `HEYA` to check if everything is fine - the server should reply with _HEY!_. |
| 31 | + |
| 32 | +You're done with setting up `skyd` 🎉! |
| 33 | + |
| 34 | +## Get started with Docker |
| 35 | + |
| 36 | +First of all, you need to have Docker installed and available on your `PATH` ; you can read the official guide [here](https://docs.docker.com/get-docker/). Once you've got Docker up and running, follow the steps! |
| 37 | + |
| 38 | +:::note |
| 39 | +You may need superuser privileges for installation and running the commands below |
| 40 | +::: |
| 41 | + |
| 42 | +### Step 0: Create and start the container |
| 43 | + |
| 44 | +We'll create a container where: |
| 45 | + |
| 46 | +1. We'll call our container `mysky` |
| 47 | +2. We'll expose port 2003 of the container |
| 48 | +3. We'll save all our data on the host in a folder called `skytable` relative to the current directory. To achieve this, we'll make use of Docker volumes. |
| 49 | + |
| 50 | +Open up a terminal and run: |
| 51 | + |
| 52 | +```sh |
| 53 | +docker run --name mysky \ |
| 54 | + -v ./skytable:/var/lib/skytable \ |
| 55 | + -p 2003:2003 \ |
| 56 | + skytable/sdb:v0.7.3 |
| 57 | +``` |
| 58 | + |
| 59 | +### Step 1: Download and setup the bundle |
| 60 | + |
| 61 | +Follow the [instructions above](#get-started-with-bundles) so that you're ready to run `skysh` |
| 62 | + |
| 63 | +### Step 2: Connect to the instance |
| 64 | + |
| 65 | +Simply run: |
| 66 | + |
| 67 | +```sh |
| 68 | +skysh -h 127.0.0.1 -p 2003 |
| 69 | +``` |
| 70 | + |
| 71 | +Now, you're all set! |
0 commit comments