diff --git a/extras/deploy-scripts/pandora_deploy_community_el8.sh b/extras/deploy-scripts/pandora_deploy_community_el8.sh index a4a80af6c5..0f3ceadb39 100644 --- a/extras/deploy-scripts/pandora_deploy_community_el8.sh +++ b/extras/deploy-scripts/pandora_deploy_community_el8.sh @@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf -S_VERSION='2022052501' +S_VERSION='202209231' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" # define default variables @@ -26,6 +26,7 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" [ "$DBUSER" ] || DBUSER=pandora [ "$DBPASS" ] || DBPASS=pandora [ "$DBPORT" ] || DBPORT=3306 +[ "$DBROOTUSER" ] || DBROOTUSER=root [ "$DBROOTPASS" ] || DBROOTPASS=pandora [ "$SKIP_PRECHECK" ] || SKIP_PRECHECK=0 [ "$SKIP_DATABASE_INSTALL" ] || SKIP_DATABASE_INSTALL=0 @@ -73,13 +74,16 @@ check_cmd_status () { } check_pre_pandora () { - export MYSQL_PWD=$DBPASS echo -en "${cyan}Checking environment ... ${reset}" rpm -qa | grep 'pandorafms_' &>> /dev/null && local fail=true [ -d "$PANDORA_CONSOLE" ] && local fail=true [ -f /usr/bin/pandora_server ] && local fail=true - echo "use $DBNAME" | mysql -uroot -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true + + if [ "$SKIP_DATABASE_INSTALL" -eq '0' ]; then + export MYSQL_PWD=$DBPASS + echo "use $DBNAME" | mysql -u$DBUSER -P$DBPORT -h$DBHOST &>> /dev/null && local fail=true + fi [ ! $fail ] check_cmd_status 'Error there is a current Pandora FMS installation on this node, please remove it to execute a clean install' @@ -214,7 +218,7 @@ if [ "$PHPVER" -eq '8' ] ; then execute_cmd "dnf module install -y php:remi-8.0" "Configuring PHP 8" fi -# Install percona Database + # Install percona Database execute_cmd "dnf module disable -y mysql" "Disabiling mysql module" if [ "$MYVER" -eq '80' ] ; then @@ -226,7 +230,6 @@ 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=" \ php \ @@ -401,30 +404,28 @@ if [ "$SKIP_DATABASE_INSTALL" -eq '0' ] ; then 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!'; + SET PASSWORD FOR '$DBROOTUSER'@'localhost' = 'Pandor4!'; UNINSTALL COMPONENT 'file://component_validate_password'; - SET PASSWORD FOR 'root'@'localhost' = '$DBROOTPASS'; - """ | mysql --connect-expired-password -uroot &>> "$LOGFILE" + SET PASSWORD FOR '$DBROOTUSER'@'localhost' = '$DBROOTPASS'; + """ | mysql --connect-expired-password -u$DBROOTUSER &>> "$LOGFILE" fi if [ "$MYVER" -ne '80' ] ; then echo """ - SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Pandor4!'); + SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('Pandor4!'); UNINSTALL PLUGIN validate_password; - SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$DBROOTPASS'); - """ | mysql --connect-expired-password -uroot &>> "$LOGFILE"fi + SET PASSWORD FOR '$DBROOTUSER'@'localhost' = PASSWORD('$DBROOTPASS'); + """ | mysql --connect-expired-password -u$DBROOTUSER &>> "$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 "CREATE USER \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -uroot -P$DBPORT -h$DBHOST -echo "ALTER USER \"$DBUSER\"@'%' IDENTIFIED WITH mysql_native_password 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=$DBROOTPASS + echo -en "${cyan}Creating Pandora FMS database...${reset}" + echo "create database $DBNAME" | mysql -u$DBROOTUSER -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." -export MYSQL_PWD=$DBPASS + echo "CREATE USER \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST + echo "ALTER USER \"$DBUSER\"@'%' IDENTIFIED WITH mysql_native_password BY \"$DBPASS\"" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST + echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%'" | mysql -u$DBROOTUSER -P$DBPORT -h$DBHOST #Generating my.cnf cat > /etc/my.cnf << EO_CONFIG_F @@ -471,12 +472,14 @@ 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 + if [ "$MYVER" -eq '80' ] ; then + sed -i -e "/query_cache.*/ s/^#*/#/g" /etc/my.cnf + fi + + execute_cmd "systemctl restart mysqld" "Configuring database engine" + execute_cmd "systemctl enable mysqld --now" "Enabling Database service" fi - -execute_cmd "systemctl restart mysqld" "Configuring database engine" - +export MYSQL_PWD=$DBPASS #Define packages if [ "$PANDORA_BETA" -eq '0' ] ; then @@ -503,7 +506,6 @@ tar xvzf gotty_linux_amd64.tar.gz &>> $LOGFILE execute_cmd "mv gotty /usr/bin/" 'Installing gotty util' # Enable Services -execute_cmd "systemctl enable mysqld --now" "Enabling Database service" execute_cmd "systemctl enable httpd --now" "Enabling HTTPD service" execute_cmd "systemctl enable php-fpm --now" "Enabling PHP-FPM service" diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 53bc403e77..36bd36b51e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.764-220906 +Version: 7.0NG.764-220907 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 06a8cf8871..537a4da2ce 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.764-220906" +pandora_version="7.0NG.764-220907" 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 7b8d914ac6..d6a2abd49b 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.764'; -use constant AGENT_BUILD => '220906'; +use constant AGENT_BUILD => '220907'; # 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 fee22414fe..d5117d099b 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.764 -%define release 220906 +%define release 220907 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 7e9dcc7497..b0a01d7739 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.764 -%define release 220906 +%define release 220907 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 c93f1cb3a4..da7891791b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.764" -PI_BUILD="220906" +PI_BUILD="220907" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d65b18cdb5..ff39f2c18d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220906} +{220907} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d29734a0f1..1f738317b9 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.764 Build 220906") +#define PANDORA_VERSION ("7.0NG.764 Build 220907") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 537b336dcc..9fa7bc53bf 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.764(Build 220906))" + VALUE "ProductVersion", "(7.0NG.764(Build 220907))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 89d1cc9045..ee45ec5dcd 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.764-220906 +Version: 7.0NG.764-220907 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 209f7662f7..35fdfe802a 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.764-220906" +pandora_version="7.0NG.764-220907" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c8bb663d5b..87d0164d86 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 = 'PC220906'; +$build_version = 'PC220907'; $pandora_version = 'v7.0NG.764'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f7ce4182fc..57a0f269f0 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 2819d9875d..909a4c162d 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.764 -%define release 220906 +%define release 220907 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 8c641b766d..70ae269f72 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.764 -%define release 220906 +%define release 220907 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9fcd160325..7ed48336cc 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.764" -PI_BUILD="220906" +PI_BUILD="220907" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index dd99dca70e..2c498d6d0f 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.764 Build 220906"; +my $version = "7.0NG.764 Build 220907"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 6fd8ccd74d..7444ca4c54 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.764 Build 220906"; +my $version = "7.0NG.764 Build 220907"; # save program name for logging my $progname = basename($0);