Skip to main content

Offline installation

This procedure is currently unavailable for Debian platforms.

To be able to install Centreon on servers with no internet access, create a local copy of the Centreon repository on a server that has an internet access, and then make your offline Centreon servers point to it.

Creating a local copy of the Centreon repository​

  1. Install the repository on your mirror server.
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/26.10/el9/centreon-26.10.repo
dnf clean all --enablerepo=*
dnf update

Then retrieve the gpg key for the packages:

rpm --import https://yum-gpg.centreon.com/RPM-GPG-KEY-CES
  1. Create a directory for the local repository:

    mkdir -p /var/www/html/repos/centreon
  2. Install the required packages:

    yum install yum-utils createrepo httpd
  3. Synchronize the repositories:

    reposync -p /var/www/html/repos/centreon/ -r centreon-26.10-stable-noarch
    reposync -p /var/www/html/repos/centreon/ -r centreon-26.10-stable
    reposync -p /var/www/html/repos/centreon/ -r centreon-plugins-26.10-stable-noarch
    reposync -p /var/www/html/repos/centreon/ -r centreon-plugins-26.10-stable
  4. Create the repository:

    createrepo /var/www/html/repos/centreon/
  5. Start the web server:

    service httpd start
  6. On your Centreon server, edit the following file:

    vi /etc/yum.repos.d/centreon.repo

    Add the following lines:

    [centreon]
    name=centreon
    baseurl=http://<mirror_ip_address>/repos/centreon
    gpgcheck=1
    enabled=1

    Replace <mirror_ip_address> with the actual address of your local repository.

Keeping your local repository up to date​

To synchronize your mirror with the Centreon repository regularly, create a cron file:

cd /var/spool/cron
crontab -e

The following commands will schedule a synchronization every day at 2:00 for the centreon-26.10-stable-noarch and centreon-plugins-26.10-stable-noarch repositories and every day at 3:00 for the centreon-26.10-stable and centreon-plugins-26.10-stable repositories. It will also rebuild the repository metadata every day at 4:

0 2 * * * reposync -p /var/www/html/repos/centreon/ -r centreon-26.10-stable-noarch
0 3 * * * reposync -p /var/www/html/repos/centreon/ -r centreon-26.10-stable
0 2 * * * reposync -p /var/www/html/repos/centreon/ -r centreon-plugins-26.10-stable-noarch
0 3 * * * reposync -p /var/www/html/repos/centreon/ -r centreon-plugins-26.10-stable
0 4 * * * createrepo --update /var/www/html/repos/centreon/