Sticky

Differences between RHEL and Debian installation

  • 12 July 2022
  • 7 replies
  • 558 views

Userlevel 6
Badge +18

Of course, besides the package manager (apt), there are some differences between RHEL and Centreon:

 

Packages management

  RHEL Debian
Get list of repositories yum repolist grep ^[^#] /etc/apt/sources.list /etc/apt/sources.list.d/*
Clean cache yum clean all apt clean all
Create cache yum makecache apt update
Install a package yum install centreon-web apt install centreon-web
Update a package yum update centreon-web apt upgrade centreon-web
Reinstall a package yum reinstall centreon-trap apt reinstall centreon-trap
Search for a package yum search centreon-web apt search centreon-web
Get information about a package yum info centreon-web apt info centreon-web
Know which package provide a binary yum provides */centreontrapd dpkg -S centreontrapd
Interrogate list of installed package rpm -qa apt list --installed
Know which dependencies will be installed with a package yum deplist centreon-tra apt depends centreon-trap

 

Define proxy for packages manager

RHEL Debian

cat <<EOF >> /etc/yum.conf

proxy=http://10.0.0.133:3128

EOF

cat <<EOF >> /etc/apt/apt.conf.d/80proxy

Acquire::http::proxy "http://10.0.0.133:3128/";

Acquire::https::proxy "http://10.0.0.133:3128/";

Acquire::ftp::proxy "ftp://10.0.0.133:3128/";

EOF

 

Process start options

RHEL Debian

/etc/sysconfig/{centreontrapd, gorgoned, snmpd, snmptrapd}

/etc/default/{centreontrapd, gorgoned, snmpd, snmptrapd}

 

Apache logs

RHEL Debian

/var/log/httpd/ (EL8)

/var/log/httpd24/ (EL7)

/var/log/apache2/

 

Apache user

RHEL Debian
apache www-data

 

Apache configuration

RHEL Debian

/etc/httpd/conf.d/10-centreon.conf (EL8)

/opt/rh/httpd24/root/etc/httpd/conf.d/10-centreon.conf (EL7)

/etc/apache2/sites-available/centreon.conf

 

Securitization of Apache on Debian

Edit /etc/apache2/conf-enabled/security.conf file and add:

Header set X-Frame-Options: "sameorigin"

Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=Strict

Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

ServerSignature Off

ServerTokens Prod

TraceEnable Off

For RHEL 7/8, follow this chapter

 

PHP error logs

RHEL Debian
/var/log/php-fpm/centreon-error.log /var/log/apache2/error.log

 


7 replies

Userlevel 1
Badge +11

# Enable HttpOnly / Secure flags and hide the Apache server signature

File: /etc/apache2/conf-enabled/security.conf

          Header set X-Frame-Options: "sameorigin"

          Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=Strict

          Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

          ServerSignature Off

          ServerTokens Prod

          TraceEnable Off

Userlevel 1
Badge +11

 

 

Userlevel 6
Badge +18

Hi @coco163 these options should be the same for EL 7/8, isn’t it?

Userlevel 1
Badge +11

Not the same file

/etc/httpd/conf.d/10-centreon.conf

Userlevel 6
Badge +18

But I already mention it that Apache conf file are different

Userlevel 1
Badge +11

Certes, mais pas pour ce fichier

Badge

For PHP configuration:

RHEL DEBIAN
/etc/php.d/50-centreon.ini /etc/php/8.1/cli/conf.d/50-centreon.ini
/etc/php-fpm.d/centreon.conf /etc/php/8.1/fpm/pool.d/centreon.conf
/etc/php.ini /etc/php/8.1/fpm/php.ini 

 

Reply