Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bugfix for line 473 NetworkServer.pm and CentOS 7 installation notes
#1
I'm just getting started with Pandora FMS, but I have a couple notes others may find helpful. First is a bug I found and think I've fixed.

Reviewing my error log, I saw this:
==> /var/log/pandora/pandora_server.error <==
Use of uninitialized value in string eq at /usr/lib/perl5/PandoraFMS/NetworkServer.pm line 473.

To correct it, I changed line 473 from:
if ($module->{'custom_string_2'} eq "inherited" ) {

to 
if ((defined $module->{'custom_string_2'}) && ($module->{'custom_string_2'} eq "inherited" )) {

Second, I think there are a few steps that were skipped when describing a CentOS 7 install, but I tried to keep my steps as I went through it so that others doing a similar install may find whatever they missed here.

#Installation steps I took. Some of these can be consolidated, but this is the order I did them in.
yum -y install mod_ssl openssl httpd vim screen
openssl genrsa -out ca.key 2048
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload

systemctl enable httpd
#Confirm you have http and https service available
yum -y install epel-release yum-utils
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php73
echo "[artica_pandorafms]
name=CentOS7 - PandoraFMS official repo
baseurl=http://firefly.artica.es/centos7
gpgcheck=0
enabled=1" > /etc/yum.repos.d/pandorafms.repo
yum makecache
yum -y install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd
yum -y install graphviz libxslt make mariadb mariadb-server mod_php net-snmp net-tools nmap pandorafms_console pandorafms_server perl-CPAN perl-DBD-mysql perl-DBI perl-Encode-Locale perl-HTML-Tree perl-IO-Socket-INET6 perl-libwww-perl perl-NetAddr-IP perl-SNMP perl-Socket6 perl-XML-SAX perl-XML-Simple perl-XML-Twig php php-cli php-common php-curl php-gd php-ldap php-mbstring php-mysql php-mysqlnd php-ocache php-mccrypt php-pear php-pear-DB php-snmp php-xml php-xmlrpc php-zip sudo xorg-x11-fonts-75dpi xorg-x11-fonts-misc xprobe2
systemctl start mariadb
systemctl enable mariadb

#Set your root password here and go with the defaults unless you have a reason not to.
mysql_secure_installation

hostnamectl set-hostname pandorafms.yourdomain.com
yum -y install net-tools
systemctl enable mariadb.service
sed -i 's/PrivateTmp=true/PrivateTmp=false/g' /etc/systemd/system/multi-user.target.wants/httpd.service
setenforce 0
sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
chmod -R 777 /var/www/html/pandora_console/include
systemctl restart httpd
systemctl status httpd

yum -y install traceroute bind-utils
echo "vim /var/www/html/pandora_console/include/config.php /etc/pandora/pandora_server.conf and make sure passwords for pandora database are correct."
tar xvjf phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 /usr/local/share/
ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin
yum -y install nfdump
echo "[Unit]
Description=Pandora FMS server daemon
After=network.target network-online.target remote-fs.target basic.target

[Service]
Type=forking
ExecStart=/usr/bin/pandora_server /etc/pandora/pandora_server.conf -D

[Install]
WantedBy=multi-user.target" > /usr/lib/systemd/system/pandora_server.service
systemctl enable pandora_server
systemctl start pandora_server
systemctl status pandora_server
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes