- docker-compose ```yaml version: ‘3’
services: cassandra: image: cassandra:4.0.3 container_name: cassandra ports:
- '7000:7000'
- '9042:9042'
volumes:
- ./data/cassandra:/bitnami
environment:
- CASSANDRA_SEEDS=cassandra
- CASSANDRA_PASSWORD_SEEDER=yes
- CASSANDRA_PASSWORD=cassandra
2. docker
参照官方文档:[https://cassandra.apache.org/_/quickstart.html](https://cassandra.apache.org/_/quickstart.html)
```shell
# GET CASSANDRA USING DOCKER
docker pull cassandra:latest
# START CASSANDRA
docker network create cassandra
docker run --rm -d --name cassandra --hostname cassandra --network cassandra cassandra