Running YDB from a binary file
- Connection parameters
- Installation
- Starting
- Stopping
- Making queries via the YDB CLI
- Working with the database via the Web UI
- Additional information
This section describes how to deploy a local YDB cluster using a compiled binary file. Currently, the system only supports builds for Linux. Support for Windows and MacOS builds will be added later.
Connection parameters
As a result of completing the steps below, you’ll get a YDB database running on a local machine that you can connect to using the following:
- Endpoint:
grpc://localhost:2136
- Database location:
/Root/test
- Authentication: Anonymous (without authentication)
Installation
Create a working directory. Run the script for downloading an archive with the ydbd
executable file and the necessary YDB libraries, and a set of scripts and auxiliary files for starting and stopping the server:
curl https://binaries.ydb.tech/local_scripts/install.sh | bash
Starting
The local YDB server can be started in two modes:
Storing data on disk
Storing data in memory
To store data on disk, when running the script for the first time, a 64 GB file named
ydb.data
is created in the working directory. Make sure you have enough free space to create it.Run the following command from the working directory:
./start.sh disk
When using in-memory data storage, the data is lost when stopping the server.
Run the following command from the working directory:
./start.sh ram
The YDB server is started in the context of the current terminal window. Closing the terminal window stops the server.
If you get an error saying Failed to set up IC listener on port 19001 errno# 98 (Address already in use)
at startup, the server might have already been started and you should stop it with the stop.sh
script (see below).
Stopping
To stop the server, run the following command in the working directory:
./stop.sh
Making queries via the YDB CLI
Install the YDB CLI and execute queries as described in YDB CLI - Getting started using the endpoint and database location specified at the beginning of this article. For example:
ydb -e grpc://localhost:2136 -d /Root/test scheme ls
Working with the database via the Web UI
To work with the DB structure and data, you can also use the web interface embedded in the ydbd
process. It is available at http://localhost:8765
. For more information about the embedded web interface, see Embedded UI.
Additional information
Instructions for administrators on how to deploy clusters from multiple nodes and configure them are given in Deploy YDB on-premises in the “Administration” section.