2. Create a local cluster
1. 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.
2. 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 |
+--------------------------------------------------------------------------------------------------+
3. Check cluster status with Admin UI
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 Admin UI home page shows that you have a cluster with Replication Factor
of 1 and Num Nodes (TServers)
as 1. Num User Tables
is 0 since there are no user tables created yet. The YugabyteDB version number is also shown for your reference.
The Masters section highlights the 1 yb-master along with its corresponding cloud, region and zone placement.
YB-TServer status
Clicking See all nodes
takes you to the Tablet Servers page where you can observe the 1 yb-tserver along with the time since it last connected to this yb-master via regular heartbeats. Since there are no user tables created yet, you can see that the Load (Num Tablets)
is 0. As new tables get added, new tablets (aka shards) will be created automatically and distributed evenly across all the available tablet servers.
Next step
Explore YSQL