When doing a "apt install cassandra", Cassandra will start as a service with a default configuration. Isn't there a way to provide a custom configuration, so that the service will start with the desired configuration, or install with service in stopped mode?

It seems a bit silly to have to stop service, change configuration, delete /var/lib/cassandra/* and finally restart service.

1 Answer 1


This isn't really a Cassandra or database question. This is really a Linux admin question.

If you place configurations files on the server BEFORE installing packages, APT by default will keep those configuration files and not replace them with those that are included in the package.

For the second part of your question, you can configure systemd Presets to prevent services from starting after a package is installed. For example:

disable some_package.service

For details, see the linked site. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.