Merge branch 'ent-11296-problemas-merging-tool-y-cambios-en-el-instalador-online' into 'develop'

11296 remove dependencies and add proxytimeout

See merge request artica/pandorafms!6194
This commit is contained in:
Rafael Ameijeiras 2023-07-18 08:03:19 +00:00
commit 2a03a9ae2f
3 changed files with 22 additions and 27 deletions

View File

@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2023050901' S_VERSION='2023062901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables # define default variables
@ -285,8 +285,7 @@ console_dependencies=" \
mod_ssl \ mod_ssl \
libzstd \ libzstd \
openldap-clients \ openldap-clients \
chromium \ chromium"
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies" execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies # Server dependencies
@ -313,7 +312,6 @@ server_dependencies=" \
bind-utils \ bind-utils \
whois \ whois \
cpanminus \ cpanminus \
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 \ http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm" https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies" execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
@ -341,7 +339,6 @@ execute_cmd "yum install -y $oracle_dependencies || yum reinstall -y $oracle_dep
#ipam dependencies #ipam dependencies
ipam_dependencies=" \ ipam_dependencies=" \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl(NetAddr::IP) \ perl(NetAddr::IP) \
perl(Sys::Syslog) \ perl(Sys::Syslog) \
perl(DBI) \ perl(DBI) \
@ -719,6 +716,9 @@ echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cro
systemctl enable pandora_agent_daemon &>> $LOGFILE systemctl enable pandora_agent_daemon &>> $LOGFILE
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent" execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
# Enable postrix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner #SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me) [ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)

View File

@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2023050901' S_VERSION='2023062901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables # define default variables
@ -344,8 +344,7 @@ console_dependencies=" \
http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ 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/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/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \ http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm"
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies" execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies # Server dependencies
@ -371,7 +370,7 @@ server_dependencies=" \
java \ java \
bind-utils \ bind-utils \
whois \ whois \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \ libnsl \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.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" https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies" execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
@ -399,7 +398,6 @@ execute_cmd "dnf install -y $oracle_dependencies" "Installing Oracle Instant cli
#ipam dependencies #ipam dependencies
ipam_dependencies=" \ ipam_dependencies=" \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl(NetAddr::IP) \ perl(NetAddr::IP) \
perl(Sys::Syslog) \ perl(Sys::Syslog) \
perl(DBI) \ perl(DBI) \
@ -622,8 +620,9 @@ 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/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
#adding 900s to httpd timeout #adding 900s to httpd timeout and 300 to ProxyTimeout
echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
echo 'ProxyTimeout 300' >> /etc/httpd/conf.d/timeout.conf
cat > /var/www/html/index.html << EOF_INDEX cat > /var/www/html/index.html << EOF_INDEX
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/"> <meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
@ -787,6 +786,9 @@ echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cro
systemctl enable pandora_agent_daemon &>> "$LOGFILE" systemctl enable pandora_agent_daemon &>> "$LOGFILE"
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent" execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
# Enable postfix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner #SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me) [ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)

View File

@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
WORKDIR=/opt/pandora/deploy WORKDIR=/opt/pandora/deploy
S_VERSION='2023050901' S_VERSION='2023062901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
rm -f $LOGFILE &> /dev/null # remove last log before start rm -f $LOGFILE &> /dev/null # remove last log before start
@ -265,7 +265,6 @@ server_dependencies=" \
openssh-client \ openssh-client \
postfix \ postfix \
unzip \ unzip \
xprobe \
coreutils \ coreutils \
libio-compress-perl \ libio-compress-perl \
libmoosex-role-timer-perl \ libmoosex-role-timer-perl \
@ -287,6 +286,7 @@ server_dependencies=" \
libgeo-ip-perl \ libgeo-ip-perl \
arping \ arping \
snmp-mibs-downloader \ snmp-mibs-downloader \
libnsl2 \
openjdk-8-jdk " openjdk-8-jdk "
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies" execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
@ -299,17 +299,7 @@ echo -en "${cyan}Installing wmic and pandorawmic...${reset}"
chmod +x pandorawmic wmic &>> "$LOGFILE" && \ chmod +x pandorawmic wmic &>> "$LOGFILE" && \
cp -a wmic /usr/bin/ &>> "$LOGFILE" && \ cp -a wmic /usr/bin/ &>> "$LOGFILE" && \
cp -a pandorawmic /usr/bin/ &>> "$LOGFILE" cp -a pandorawmic /usr/bin/ &>> "$LOGFILE"
check_cmd_status "Error Installing phanromjs" check_cmd_status "Error Installing pandorawmic/wmic"
# phantomjs
echo -en "${cyan}Installing phantomjs...${reset}"
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
export OPENSSL_CONF=/etc/ssl
curl -LSs -O "https://firefly.pandorafms.com/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
tar xvjf "$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
mv $PHANTOM_JS/bin/phantomjs /usr/bin &>> "$LOGFILE" && \
/usr/bin/phantomjs --version &>> "$LOGFILE"
check_cmd_status "Error Installing phanromjs"
# create symlink for fping # create symlink for fping
rm -f /usr/sbin/fping &>> "$LOGFILE" rm -f /usr/sbin/fping &>> "$LOGFILE"
@ -370,7 +360,6 @@ source '/root/.profile' &>> "$LOGFILE"
#ipam dependencies #ipam dependencies
ipam_dependencies=" \ ipam_dependencies=" \
xprobe \
libnetaddr-ip-perl \ libnetaddr-ip-perl \
coreutils \ coreutils \
libdbd-mysql-perl \ libdbd-mysql-perl \
@ -619,8 +608,9 @@ sed --follow-symlinks -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.i
sed --follow-symlinks -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini sed --follow-symlinks -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
sed --follow-symlinks -i -e "s/^disable_functions/;disable_functions/" /etc/php.ini sed --follow-symlinks -i -e "s/^disable_functions/;disable_functions/" /etc/php.ini
#adding 900s to httpd timeout #adding 900s to httpd timeout and 300 to ProxyTimeout
#echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf echo 'TimeOut 900' > /etc/apache2/conf-enabled/timeout.conf
echo 'ProxyTimeout 300' >> /etc/apache2/conf-enabled/timeout.conf
cat > /var/www/html/index.html << EOF_INDEX cat > /var/www/html/index.html << EOF_INDEX
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/"> <meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
@ -792,6 +782,9 @@ systemctl enable pandora_agent_daemon &>> "$LOGFILE"
#fix path phantomjs #fix path phantomjs
sed --follow-symlinks -i -e "s/^openssl_conf = openssl_init/#openssl_conf = openssl_init/g" /etc/ssl/openssl.cnf &>> "$LOGFILE" sed --follow-symlinks -i -e "s/^openssl_conf = openssl_init/#openssl_conf = openssl_init/g" /etc/ssl/openssl.cnf &>> "$LOGFILE"
# Enable postfix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner #SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me) [ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)