What's the best practice for setting up new servers?
I'm facing the problem that from time to time, when installing a new system, be it virtual machines in VMWare, be it new VDS of the customer's server, I have to constantly install the same packages (Nginx, firewalld, htop, python), make the same configs and install the same application. And it's all in the command line. Is there some way to make this process comfortable? I was thinking about various Web administration applications (such as FastPanel, CWP and etc), but did not find any specific standard. How do you cope with all this when you have a lot of servers at your disposal and you need to do the same settings?
I do not consider the case when you have a cluster of identical virtual machines and you can simply install a ready-made system image, because, among other things, I have to work with third-party systems in other companies where I cannot install a specific image and must manually install all the software
P.S. For reference, I mostly work with Ubuntu, CentOS and Redhat.
Automate the install and configuration of software. Functions to install a list of packages is basic functionality in the "standard library" of automation tools. Or relatively easy to write your own scripts.
Write your own packages to wrap things in easily installable, dependency aware, archives. For example, a requirements file to create a python venv. Or, wrapping the application in a system package like rpm or deb.
Copy in pre-built config files. Use a tool that can do templates with variables where there are site-specific values.
Properly done, automation will do tasks faster and more reliably than manually.