Offline installation
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
- Install the repository on your mirror server.
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11 & 12
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.04/el8/centreon-24.04.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
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.04/el9/centreon-24.04.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
To install the Centreon repository, execute the following command:
echo "deb https://packages.centreon.com/apt-standard-24.04-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
Then import the repository key:
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt update
Create a directory for the local repository:
mkdir -p /var/www/html/repos/centreon
Install the required packages:
yum install yum-utils createrepo httpd
Synchronize the repositories:
reposync -p /var/www/html/repos/centreon/ -r centreon-stable-noarch
reposync -p /var/www/html/repos/centreon/ -r centreon-stableCreate the repository:
createrepo /var/www/html/repos/centreon/
Start the web server:
service httpd start
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=1Replace
<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 for the centreon-stable-noarch repository, and every day at 3 for the centreon-stable repository:
* 2 * * * reposync -p /var/www/html/repos/centreon/ -r centreon-stable-noarch
* 3 * * * reposync -p /var/www/html/repos/centreon/ -r centreon-stable