diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index cdfcd951ca..0b17821b46 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -14,11 +14,13 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf -S_VERSION='2022020801' +S_VERSION='2022050501' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" # define default variables [ "$TZ" ] || TZ="Europe/Madrid" +[ "$MYVER" ] || MYVER=57 +[ "$PHPVER" ] || PHPVER=7 [ "$DBHOST" ] || DBHOST=127.0.0.1 [ "$DBNAME" ] || DBNAME=pandora [ "$DBUSER" ] || DBUSER=pandora @@ -203,15 +205,28 @@ fi #Installing wget execute_cmd "dnf install -y wget" "Installing wget" -#Installing extra repositiries - +#Installing php execute_cmd "dnf module reset -y php " "Disabling standard PHP module" -execute_cmd "dnf module install -y php:remi-7.4" "Configuring PHP" +if [ "$PHPVER" -ne '8' ] ; then + execute_cmd "dnf module install -y php:remi-7.4" "Configuring PHP 7" +fi + +if [ "$PHPVER" -eq '8' ] ; then + execute_cmd "dnf module install -y php:remi-8.0" "Configuring PHP 8" +fi # Install percona Database execute_cmd "dnf module disable -y mysql" "Disabiling mysql module" -#rm -rf /etc/my.cnf -execute_cmd "dnf install -y Percona-Server-server-57" "Installing Percona Server" + +if [ "$MYVER" -eq '80' ] ; then + execute_cmd "percona-release setup ps80 -y" "Enabling mysql80 module" + execute_cmd "dnf install -y percona-server-server percona-xtrabackup-24" "Installing Percona Server 80" +fi + +if [ "$MYVER" -ne '80' ] ; then + execute_cmd "dnf install -y Percona-Server-server-57 percona-xtrabackup-24" "Installing Percona Server 57" +fi + # Console dependencies console_dependencies=" \ @@ -381,20 +396,31 @@ EO_CONFIG_TMP #Configuring Database if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then -execute_cmd "systemctl start mysqld" "Starting database engine" -export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev) -echo """ - SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pandor4!'); - UNINSTALL PLUGIN validate_password; - SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$DBROOTPASS'); - """ | mysql --connect-expired-password -uroot &>> "$LOGFILE" + execute_cmd "systemctl start mysqld" "Starting database engine" + export MYSQL_PWD=$(grep "temporary password" /var/log/mysqld.log | rev | cut -d' ' -f1 | rev) + if [ "$MYVER" -eq '80' ] ; then + echo """ + SET PASSWORD FOR 'root'@'localhost' = 'Pandor4!'; + UNINSTALL COMPONENT 'file://component_validate_password'; + SET PASSWORD FOR 'root'@'localhost' = '$DBROOTPASS'; + """ | mysql --connect-expired-password -uroot &>> "$LOGFILE" + fi + + if [ "$MYVER" -ne '80' ] ; then + echo """ + SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pandor4!'); + UNINSTALL PLUGIN validate_password; + SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$DBROOTPASS'); + """ | mysql --connect-expired-password -uroot &>> "$LOGFILE"fi + fi fi export MYSQL_PWD=$DBROOTPASS echo -en "${cyan}Creating Pandora FMS database...${reset}" echo "create database $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST check_cmd_status "Error creating database $DBNAME, is this an empty node? if you have a previus installation please contact with support." -echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%' identified by \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST +echo "CREATE USER \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -uroot -P$DBPORT -h$DBHOST +echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%'" | mysql -uroot -P$DBPORT -h$DBHOST export MYSQL_PWD=$DBPASS #Generating my.cnf @@ -442,6 +468,10 @@ pid-file=/var/run/mysqld/mysqld.pid EO_CONFIG_F +if [ "$MYVER" -eq '80' ] ; then + sed -i -e "/query_cache.*/ s/^#*/#/g" /etc/my.cnf +fi + execute_cmd "systemctl restart mysqld" "Configuring database engine" diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e5588ee38f..52f0fb525d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.762 +Version: 7.0NG.762-220520 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index bf14b272d4..021391d946 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.762" +pandora_version="7.0NG.762-220520" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index e8529440f6..a15b94de3e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.762'; -use constant AGENT_BUILD => '220519'; +use constant AGENT_BUILD => '220520'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 0642801d0f..45490028b4 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.762 -%define release 1 +%define release 220520 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 62cc880d32..6d0a3aee9a 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.762 -%define release 1 +%define release 220520 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 5f8ffa8747..76d1f6f80e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.762" -PI_BUILD="220519" +PI_BUILD="220520" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 44b5002704..ac9a2c330d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220519} +{220520} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 69271d7b68..2bcb01c44a 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.762 Build 220519") +#define PANDORA_VERSION ("7.0NG.762 Build 220520") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 67b55916eb..018b546378 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.762(Build 220519))" + VALUE "ProductVersion", "(7.0NG.762(Build 220520))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2fee700b3b..9ec51a8981 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.762 +Version: 7.0NG.762-220520 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 20fe4a87c8..71d48137fc 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.762" +pandora_version="7.0NG.762-220520" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 051fd40b83..07beeed12b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220519'; +$build_version = 'PC220520'; $pandora_version = 'v7.0NG.762'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index fa54ca0784..98b09ad8b8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5e7ab09daf..9d0375609b 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.762 -%define release 1 +%define release 220520 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c1c11bd002..3ca06f5f6b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.762 -%define release 1 +%define release 220520 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index c8c1b64636..106f42e961 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.762" -PI_BUILD="220519" +PI_BUILD="220520" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 551295ef0a..011ec4af62 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.762 Build 220519"; +my $version = "7.0NG.762 Build 220520"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9a4aedf77f..c231dca74f 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.762 Build 220519"; +my $version = "7.0NG.762 Build 220520"; # save program name for logging my $progname = basename($0);