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, then make your offline Centreon servers point to it.
Creating a local copy of the Centreon repository
- Install centreon-release on your mirror server.
- Alma / RHEL / Oracle Linux 8
- CentOS 7
dnf install -y https://yum.centreon.com/standard/21.10/el8/stable/noarch/RPMS/centreon-release-21.10-5.el8.noarch.rpm
yum install -y https://yum.centreon.com/standard/21.10/el7/stable/noarch/RPMS/centreon-release-21.10-5.el7.centos.noarch.rpm
- Retrieve the gpg key for the packages:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
rpm --import https://yum-gpg.centreon.com/RPM-GPG-KEY-CES
rpm --import https://yum-gpg.centreon.com/RPM-GPG-KEY-CES
- Create a directory for the local repository:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
mkdir -p /var/www/html/repos/centreon
mkdir -p /var/www/html/repos/centreon
- Install the required packages:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
yum install yum-utils createrepo httpd
yum install yum-utils createrepo httpd
- Synchronize the repositories:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
reposync -p /var/www/html/repos/centreon/ --repo centreon-stable-noarch
reposync -p /var/www/html/repos/centreon/ --repo centreon-stable
reposync -p /var/www/html/repos/centreon/ --repo centreon-stable-noarch
reposync -p /var/www/html/repos/centreon/ --repo centreon-stable
- Run the following commands:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
Create the repository:
createrepo /var/www/html/repos/centreon/
Create the repository:
createrepo /var/www/html/repos/centreon/
- Start the web server:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
service httpd start
service httpd24-httpd start
- On your Centreon server, edit the following file:
- Alma / RHEL / Oracle Linux 8
- CentOS 7
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>
by the actual address of your local repository.
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>
by 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
- Alma / RHEL / Oracle Linux 8
- CentOS 7
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
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