<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.6 (unsupported)</button>

- [Latest](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/latest/installing/configure-os/centos)
- [Version 1.16](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.16/installing/configure-os/centos.md.txt)
- [Earlier versions (unsupported)](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.6/getting-support.md.txt#version-support)

<br />

You must configure the base operating system of your node machines to use Google Distributed Cloud. This page contains the steps you need to take to complete the needed configuration.  

For more information about troubleshooting Google Distributed Cloud requirements, see the [troubleshooting guides](https://docs.cloud.google.com/anthos/clusters/docs/bare-metal/1.6/troubleshooting/known-issues.md.txt).

## Before you begin

Ensure you are using a supported version of your operating system. Anthos on bare metal supports the following versions for CentOS:

- CentOS 8.1
- CentOS 8.2

Ensure you have root access to the machines you are configuring.  

Validate Package manager with the following steps:

1. Check for updates:

   ```bash
   sudo dnf check-update
   ```
2. Ensure the output has no errors and the last metadata expiration check, for example:

       # Last metadata expiration check: ...
       ...
       google-cloud-sdk.x86_64 ...

## Setting SELinux to `permissive`

1. Set SELinux to permissive:

   ```bash
   sudo setenforce 0 # temporary
   sudo sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config # persistent - requires reboot
   ```
2. Verify SELinux is set to permissive:

   ```bash
   sudo sestatus | grep "Current mode"
   # Output
   # Current mode: permissive
   ```

## Disabling `firewalld`

1. Disable `firewalld`:

   ```bash
   sudo systemctl stop firewalld
   sudo systemctl disable firewalld
   ```
2. Check the status of `firewalld` to ensure it is disabled:

   ```bash
   sudo systemctl status firewalld | grep "Active"
   # Output
   # Active: inactive (dead)
   ```

## Configuring Docker 19.03+ on your workstation

Google Distributed Cloud helps you install Docker on your bare metal machines in the
following scenarios:

- If your bare metal machines don't have Docker installed, `bmctl` installs 19.03.13 or later.
- If your bare metal machines have Docker 19.03.5 or earlier installed, `bmctl` upgrades Docker to version 19.03.13 or later.

> [!NOTE]
> **Note:** The workstation running `bmctl` needs non-root user access to Docker to start the temporary bootstrap (kind) cluster during installation. To enable non-root user access to Docker, go to [Manage Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).

Follow these steps to manually install Docker:

1. Remove any previous Docker version:

   ```bash
   sudo dnf remove docker \
     docker-client \
     docker-client-latest \
     docker-common \
     docker-latest \
     docker-latest-logrotate \
     docker-logrotate \
     docker-engine
   ```
2. Install Docker 19.03+:

   ```bash
   sudo dnf install -y yum-utils
   sudo yum-config-manager \
       --add-repo \
       https://download.docker.com/linux/centos/docker-ce.repo
   sudo dnf install -y docker-ce docker-ce-cli containerd.io
   sudo systemctl start docker
   ```
3. Verify you are now running version 19.03+:

   ```bash
   sudo docker version
   ```
4. Compare your output with the following example to ensure the Client and Server versions are 19.03+ :

        Client: Docker Engine - Community
        Version:           19.03.13
        ...
        Server: Docker Engine - Community
         Engine:
         Version:          19.03.13

## Setting up time synchronization

To ensure proper time synchronization, install an NTP service on your machines using any of the available services: [chrony](https://chrony.tuxfamily.org/), [systemd-timesyncd](https://wiki.archlinux.org/index.php/systemd-timesyncd), ntp, or ntpdate. Run `timedatectl` to verify the system clock is synchronized. The output of `timedatectl`should contain the following status:

      System clock synchronized: yes