Skip to main content

Unattended installation of a central server

An unattended installation lets you install a central server by passing all the required settings as options when you run the installation script. The script uses those values to complete the installation on its own, so the process is quick and requires little effort.

This is useful when you need to install several central servers with identical settings, when you install from a deployment tool or CI pipeline, or when you have no interactive access to the target machine.

An unattended installation always sets up the central server with a local database. To use a remote database, install the central server from packages.

Prerequisites​

  1. Update your system:

    dnf update
    subscription-manager register --username my_username --password my_password --auto-attach --force
    subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms

    Replace my_username and my_password with your Red Hat account credentials.

  2. Download the script:

    curl -L https://download.centreon.com/26.10/unattended.sh --output /tmp/unattended.sh

Installation​

  1. As root, run the script with the options you want. The script writes a full log, including any errors, to /var/log/centreon-unattended-<date>.log.

    Here is the basic command (installs MariaDB with no TLS):

    bash /tmp/unattended.sh install -t central -v 26.10

    And here are the options you can pass (see the examples below):

    OptionDescription
    -d <database>Database to install. By default, the script installs MariaDB: use -d mysql to install MySQL instead.
    --tls enabledInstalls the central server in TLS mode: the connections to the web interface and to the database are encrypted. Without this option, the central server is installed without TLS. Note that on some OSs, cryptographic policies may prevent the script from running correctly.
    -p <password>Password of the default admin database account. If you omit this option, the script generates a password and tells you where it is stored.
    -sSilent installation: the script does not prompt you for anything.
    -l <level>Level of detail of the log file: DEBUG, INFO, WARN or ERROR.

    To display the full list of options, run:

    bash /tmp/unattended.sh -h
  2. Go to http(s)://<SERVER_IP>/centreon (where <SERVER_IP> is your server's IP address) and log in. Then follow the initialization of the monitoring steps.

  3. Start using Centreon: follow our Getting started guide to start monitoring your resources.

Examples​

SettingsCommand
Using MariaDB and no TLS
bash /tmp/unattended.sh install -t central -v 26.10
Using MySQL and no TLS
bash /tmp/unattended.sh install -t central -v 26.10 -s -d mysql
Using MariaDB and TLS
bash /tmp/unattended.sh install -t central -v 26.10 -s --tls enabled
Using MySQL and TLS
bash /tmp/unattended.sh install -t central -v 26.10 -s -d mysql --tls enabled