2. Create a local cluster
Create a local cluster
To create a single-node local cluster with a replication factor (RF) of 1, run the following command.
$ ./bin/yugabyted start
After the cluster is created, clients can connect to the YSQL and YCQL APIs at localhost:5433
and localhost:9042
respectively. You can also check ~/var/data
to see the data directory and ~/var/logs
to see the logs directory.
Tip
If you have previously installed YugabyteDB (2.8 or later) and created a cluster on the same computer, you may need to upgrade the YSQL system catalog to run the latest features.Check cluster status
$ ./bin/yugabyted status
+--------------------------------------------------------------------------------------------------+
| yugabyted |
+--------------------------------------------------------------------------------------------------+
| Status : Running. Leader Master is present |
| Web console : http://127.0.0.1:7000 |
| JDBC : jdbc:postgresql://127.0.0.1:5433/yugabyte?user=yugabyte&password=yugabyte |
| YSQL : bin/ysqlsh -U yugabyte -d yugabyte |
| YCQL : bin/ycqlsh -u cassandra |
| Data Dir : /home/myuser/var/data |
| Log Dir : /home/myuser/var/logs |
| Universe UUID : fad6c687-e1dc-4dfd-af4b-380021e19be3 |
+--------------------------------------------------------------------------------------------------+
Check cluster status with Admin UI
Under the hood, the cluster you have just created consists of two processes: YB-Master which keeps track of various metadata (list of tables, users, roles, permissions, and so on), and YB-TServer which is responsible for the actual end user requests for data updates and queries.
Each of the processes exposes its own Admin UI that can be used to check the status of the corresponding process, and perform certain administrative operations. The YB-Master Admin UI is available at http://127.0.0.1:7000 and the YB-TServer Admin UI is available at http://127.0.0.1:9000.
Overview and YB-Master status
The YB-Master home page shows that you have a cluster (or universe) with a replication factor of 1, a single node, and no tables. The YugabyteDB version is also displayed.
The Masters section highlights the 1 YB-Master along with its corresponding cloud, region, and zone placement.
YB-TServer status
Click See all nodes to go to the Tablet Servers page, which lists the YB-TServer along with the time since it last connected to the YB-Master using regular heartbeats. Because there are no user tables, User Tablet-Peers / Leaders is 0. As tables are added, new tablets (aka shards) will be created automatically and distributed evenly across all the available tablet servers.