====== Guide d'installation de Pandora FMS sur Rocky Linux ======
{{indexmenu_n>31}}
===== Exigences préalables =====
* Rocky Linux 8 avec des droits d'utilisateur **root.**
* Connexion à l'internet.
===== Configuration du référentiel =====
dnf install -y \
epel-release \
tar \
dnf-utils \
http://rpms.remirepo.net/enterprise/remi-release-8.rpm
----
dnf module reset php
dnf module install -y php:remi-8.0
dnf config-manager --set-enabled powertools
----
===== Installation de la base de données Percona =====
dnf install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
dnf module disable -y mysql
rm -rf /etc/my.cnf
percona-release setup ps80 -y
dnf install -y percona-server-server percona-xtrabackup-80
===== Installation des dépendances de la console Web =====
dnf install -y \
php \
postfix \
php-mcrypt \
php-cli \
php-gd \
php-curl \
php-session \
php-mysqlnd \
php-ldap \
php-zip \
php-zlib \
php-fileinfo \
php-gettext \
php-snmp \
php-mbstring \
php-pecl-zip \
php-xmlrpc \
libxslt \
wget \
php-xml \
httpd \
mod_php \
atk \
avahi-libs \
cairo \
cups-libs \
fribidi \
gd \
gdk-pixbuf2 \
ghostscript \
graphite2 \
graphviz \
gtk2 \
harfbuzz \
hicolor-icon-theme \
hwdata \
jasper-libs \
lcms2 \
libICE \
libSM \
libXaw \
libXcomposite \
libXcursor \
libXdamage \
libXext \
libXfixes \
libXft \
libXi \
libXinerama \
libXmu \
libXrandr \
libXrender \
libXt \
libXxf86vm \
libcroco \
libdrm \
libfontenc \
libglvnd \
libglvnd-egl \
libglvnd-glx \
libpciaccess \
librsvg2 \
libthai \
libtool-ltdl \
libwayland-client \
libwayland-server \
libxshmfence \
mesa-libEGL \
mesa-libGL \
mesa-libgbm \
mesa-libglapi \
pango \
pixman \
xorg-x11-fonts-75dpi \
xorg-x11-fonts-misc \
poppler-data \
php-yaml \
mod_ssl \
libzstd \
openldap-clients \
http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm
===== Installation des dépendances du serveur PFMS =====
dnf install -y \
perl \
vim \
fping \
perl-IO-Compress \
nmap \
sudo \
perl-Time-HiRes \
nfdump \
net-snmp-utils \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
perl(XML::Simple) \
perl(Geo::IP) \
perl(IO::Socket::INET6) \
perl(XML::Twig) \
expect \
openssh-clients \
java \
bind-utils \
whois \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm
===== Dépendances Perl et VMware =====
dnf install -y \
perl-Net-HTTP \
perl-libwww-perl \
openssl-devel \
perl-Crypt-CBC \
perl-Bytes-Random-Secure \
perl-Crypt-Random-Seed \
perl-Math-Random-ISAAC \
perl-JSON \
perl-Crypt-SSLeay \
http://firefly.pandorafms.com/centos8/perl-Crypt-OpenSSL-AES-0.02-1.el8.x86_64.rpm \
http://firefly.pandorafms.com/centos8/VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.rpm
===== Installation du client Oracle =====
dnf install -y \
https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpm \
https://download.oracle.com/otn_software/linux/instantclient/19800/oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
===== Installation des dépendances pour Discovery PFMS =====
curl https://packages.microsoft.com/config/rhel/8/prod.repo -o /etc/yum.repos.d/mssql-release.repo
dnf remove unixODBC-utf16 unixODBC-utf16-devel
env ACCEPT_EULA=Y dnf install -y msodbcsql17
===== Paramètres du système d'exploitation et création de la base de données =====
setenforce 0
sed -i -e "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
systemctl disable firewalld --now
----
cat> /etc/my.cnf <
----
systemctl start mysqld
grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev
mysql -uroot -p"contraseña";
SET PASSWORD FOR 'root'@'localhost' = 'Pandor4!';
UNINSTALL COMPONENT 'file://component_validate_password';
SET PASSWORD FOR 'root'@'localhost' = 'pandora';
CREATE DATABASE pandora;
CREATE USER 'pandora'@'%' IDENTIFIED BY 'pandora';
ALTER USER 'pandora'@'%' IDENTIFIED WITH mysql_native_password BY 'pandora';
GRANT ALL PRIVILEGES ON pandora.* TO 'pandora'@'%';
exit
----
POOL_SIZE=$(grep -i total /proc/meminfo | head -1 | awk '{printf "%.2f \n", $(NF-1)*0.4/1024}' | sed "s/\\..*$/M/g")
----
cat> /etc/my.cnf <
----
systemctl restart mysqld
systemctl enable mysqld --now
----
===== Installation de la console et du serveur Pandora FMS =====
wget https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_agent_linux-7.0NG.noarch.rpm
wget https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_console-7.0NG.noarch.rpm
wget https://firefly.pandorafms.com/pandorafms/latest/RHEL_CentOS/pandorafms_server-7.0NG.noarch.rpm
----
dnf install -y ./pandorafms*.rpm
----
wget https://firefly.pandorafms.com/pandorafms/utils/gotty_linux_amd64.tar.gz
tar xvzf gotty_linux_amd64.tar.gz
mv gotty /usr/bin/
----
systemctl enable mysqld --now
systemctl enable httpd --now
----
mysql -upandora -ppandora
use pandora;
source /var/www/html/pandora_console/pandoradb.sql;
source /var/www/html/pandora_console/pandoradb_data.sql;
exit;
----
cat> /var/www/html/pandora_console/include/config.php <
----
cat> /etc/httpd/conf.d/pandora.conf <
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
EO_CONFIG_F
----
cat>> /etc/httpd/conf.modules.d/00-proxy.conf <<'EO_HTTPD_MOD'
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
EO_HTTPD_MOD
----
cat>> /etc/httpd/conf.d/wstunnel.conf <<'EO_HTTPD_WSTUNNEL'
ProxyRequests Off
Require all granted
ProxyPass /ws ws://127.0.0.1:8080
ProxyPassReverse /ws ws://127.0.0.1:8080
EO_HTTPD_WSTUNNEL
----
sed -i -e "s/php_flag engine off//g" /var/www/html/pandora_console/images/.htaccess
sed -i -e "s/php_flag engine off//g" /var/www/html/pandora_console/attachment/.htaccess
----
chmod 600 /var/www/html/pandora_console/include/config.php
chown apache. /var/www/html/pandora_console/include/config.php
mv /var/www/html/pandora_console/install.php /var/www/html/pandora_console/install.done
----
sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini
sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini
sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
----
echo 'TimeOut 900'> /etc/httpd/conf.d/timeout.conf
cat> /var/www/html/index.html <
EOF_INDEX
----
systemctl restart httpd
systemctl restart php-fpm
----
cat> /etc/snmp/snmptrapd.conf <
----
sed -i -e "s/^dbhost.*/dbhost 127.0.0.1/g" /etc/pandora/pandora_server.conf
sed -i -e "s/^dbname.*/dbname pandora/g" /etc/pandora/pandora_server.conf
sed -i -e "s/^dbuser.*/dbuser pandora/g" /etc/pandora/pandora_server.conf
sed -i -e "s|^dbpass.*|dbpass pandora|g" /etc/pandora/pandora_server.conf
sed -i -e "s/^dbport.*/dbport 3306/g" /etc/pandora/pandora_server.conf
sed -i -e "s/^#.mssql_driver.*/mssql_driver ODBC Driver 17 for SQL Server/g" /etc/pandora/pandora_server.conf
----
sed -i -e "s|^fping.*|fping /usr/sbin/fping|g" /etc/pandora/pandora_server.conf
----
sed -i "s/^remote_config.*$/remote_config 1/g" /etc/pandora/pandora_server.conf
----
cat> /etc/pandora/pandora_server.env <<'EOF_ENV'
#!/bin/bash
VERSION=19.8
export PATH=$PATH:$HOME/bin:/usr/lib/oracle/$VERSION/client64/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib
export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64
EOF_ENV
----
cat>> /etc/sysctl.conf <
----
sysctl --system
chown pandora:apache /var/log/pandora
chmod g+s /var/log/pandora
----
cat> /etc/logrotate.d/pandora_server < /etc/logrotate.d/pandora_agent <
----
chmod 0644 /etc/logrotate.d/pandora_server
chmod 0644 /etc/logrotate.d/pandora_agent
----
systemctl enable pandora_server --now
/etc/init.d/pandora_server start
systemctl enable tentacle_serverd
service tentacle_serverd start
----
echo \"* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cron-session-cookies --save-cookies /tmp/cron-session-cookies --keep session-cookies http://127.0.0.1/pandora_console/enterprise/cron.php>> /var/www/html/pandora_console/log/cron.log\">> /etc/crontab
----
systemctl enable pandora_agent_daemon
systemctl start pandora_agent_daemon
----
===== Connexion à PFMS =====
Pour accéder à la console Web, tapez l'adresse IP (ou URL) de l'appareil suivie de ''/pandora_console/'' .
Les identifiants de connexion par défaut sont :
* utilisateur : ''admin''
* mot de passe : ''pandora''
[[:es:documentation:start|Retour à l'index de la documentation du Pandora FMS]]