cockroach version
add it to path variables

//node1
cockroach start –insecure –host=localhost

//node2
cockroach start –insecure –store=node2 –host=localhost –port=26258 –http-port=8081 –join=localhost:26257

//node3
cockroach start –insecure –store=node3 –host=localhost –port=26259 –http-port=8082 –join=localhost:26257

test cluster
cockroach sql –insecure

https://www.cockroachlabs.com/docs/stable/learn-cockroachdb-sql.html

CREATE DATABASE bank;
CREATE TABLE bank.accounts (id INT PRIMARY KEY, balance DECIMAL);
INSERT INTO bank.accounts VALUES (1, 1000.50);
SELECT * FROM bank.accounts;
\q

cockroach sql –insecure –port=26258
SELECT * FROM bank.accounts;
\q

Monitor the cluster
http://localhost:8080

Stop the cluster
CTRL-C to stop the node.
cockroach sql –insecure –port=26258
SELECT * FROM bank.accounts;
\q

remove the nodes’ data stores:
rm -rf cockroach-data node2 node3

Restart the cluster
cockroach start –insecure –host=localhost

start
cockroach start –insecure –store=node2 –host=localhost –port=26258 –http-port=8081 –join=localhost:26257
cockroach start –insecure –store=node3 –host=localhost –port=26259 –http-port=8082 –join=localhost:26257

reference:
https://www.cockroachlabs.com/docs/stable/install-cockroachdb.html