Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:documentation:02_installation:02_anexo_upgrade [2021/04/26 08:16]
0.0.0.0 creado
en:documentation:02_installation:02_anexo_upgrade [2021/11/05 12:05] (current)
Line 1: Line 1:
-====== Pandora:Documentation_en:Anexo_Upgrade ======+====== Upgrades and updates ====== 
 +{{indexmenu_n>2}}
  
-[[Pandora:Documentation_en|Go back to Pandora FMS documentation index]]+[[en:documentation:start|Go back to Pandora FMS documentation index]]
  
  
-= Manual Update =+===== Manual Update =====
  
 It is important to understand the basic components in which Pandora FMS is divided. There are three main elements: console, server and database. It is important to understand the basic components in which Pandora FMS is divided. There are three main elements: console, server and database.
  
-{{ wiki:Pandora FMS standard design.png ?600|//Pandora FMS standard design//}}+{{ wiki:Pandora FMS standard design.png ?600 }}
  
 In Opensource installations, these three components are quickly updated, but in **Enterprise**' installations the process will take a few more steps, since the components have extended Enterprise features that need to be updated separately. In Opensource installations, these three components are quickly updated, but in **Enterprise**' installations the process will take a few more steps, since the components have extended Enterprise features that need to be updated separately.
Line 28: Line 29:
   * Database (additional charts of the Enterprise version).   * Database (additional charts of the Enterprise version).
  
-Updates  will **always** include console changes, **sometimes** server changes, and **once in a while** database changes. Let us organize the updates into two major categories: minor version upgrades, with //**no//** database changes, and major version upgrades, //**with//** database changes.+Updates  will **always** include console changes, **sometimes** server changes, and **once in a while** database changes. Let us organize the updates into two major categories: minor version upgrades, with **//no//** database changes, and major version upgrades, //**with**// database changes. 
 + 
 +==== Update a minor version ====
  
-====== Update a minor version ====== 
 These do not include any changes in the database, only in the console and sometimes in the server. E.g. updates 6.1 SP1 to 6.1 SP2. These do not include any changes in the database, only in the console and sometimes in the server. E.g. updates 6.1 SP1 to 6.1 SP2.
  
-Initial precautions: [[Pandora:Documentation_en:Backup_and_restore_procedures|here]] you have the detailed procedure to backup and restore Pandora MFS. However, here is a summary of the backup procedure:+Initial precautions: [[en:documentation:07_technical_annexes:07_backup_and_restore_procedures|here]] you have the detailed procedure to backup and restore Pandora MFS. However, here is a summary of the backup procedure:
  
 1. Back up the database. E.g.: 1. Back up the database. E.g.:
  
- mysqldump -u root -p pandora > backup_pandora_X.Y.sql+  mysqldump -u root -p pandora > backup_pandora_X.Y.sql
  
-2. Back up the config files: <code>pandora_server.conf</code><code>config.php</code> and <code>pandora_agent.conf</code>.+2. Back up the config files: ''pandora_server.conf''''config.php'' and ''pandora_agent.conf''.
  
 3. Back up server and agent plugins, at:  3. Back up server and agent plugins, at: 
  
 +<code>
  /etc/pandora/plugins  /etc/pandora/plugins
  pandora_console/attachment/plugin  pandora_console/attachment/plugin
  /usr/share/pandora_server/util/plugin  /usr/share/pandora_server/util/plugin
 +</code>
  
-4. Suspend the following services: <code>pandora_server</code><code>tentacle_serverd</code><code>httpd</code><code>pandora_agent</code> and <code>mysqld</code>.+4. Suspend the following services: ''pandora_server''''tentacle_serverd''''httpd''''pandora_agent'' and ''mysqld''.
  
 5. Proceed to update. 5. Proceed to update.
  
-===== From RPM packages =====+=== From RPM packages === 
   * Open console update:   * Open console update:
  
- rpm -U pandorafms_console_package.rpm+  rpm -U pandorafms_console_package.rpm
  
   * Enterprise console update:   * Enterprise console update:
  
- rpm -U pandorafms_console_enterprise_package.rpm+  rpm -U pandorafms_console_enterprise_package.rpm
  
   * Open server update:   * Open server update:
  
- rpm -U pandorafms_server_package.rpm+  rpm -U pandorafms_server_package.rpm
  
   * Enterprise server update with tar.gz:   * Enterprise server update with tar.gz:
  
 +<code>
  tar -xvzf pandorafms_server_enterprise_package.tar.gz  tar -xvzf pandorafms_server_enterprise_package.tar.gz
  cd pandora_server  cd pandora_server
  ./pandora_server_installer --install  ./pandora_server_installer --install
 +</code>
  
 You can find out which version you have installed at any time, before or after the installation by executing the command: You can find out which version you have installed at any time, before or after the installation by executing the command:
  
- rpm -qa | grep -i pandora+  rpm -qa | grep -i pandora
  
-===== From DEB packages =====+=== From DEB packages ===
   * Open console update:   * Open console update:
  
- dpkg -i pandorafms_console_package.deb+  dpkg -i pandorafms_console_package.deb
  
   * Enterprise console update:   * Enterprise console update:
  
- dpkg -i pandorafms_console_enterprise_package.deb+  dpkg -i pandorafms_console_enterprise_package.deb
  
   * Open server update:   * Open server update:
  
- dpkg -i pandorafms_server_package.deb+  dpkg -i pandorafms_server_package.deb
  
   * Enterprise server update:   * Enterprise server update:
- +<code>
  tar zxvf pandorafms_server_enterprise_package.tar.gz  tar zxvf pandorafms_server_enterprise_package.tar.gz
  cd pandora_server/  cd pandora_server/
  ./pandora_server_installer --install  ./pandora_server_installer --install
 +</code>
  
 Before and after updating, you may find out the installed versions by executing this command: Before and after updating, you may find out the installed versions by executing this command:
  
- rpm -qa | grep -i pandora+  rpm -qa | grep -i pandora 
 + 
 +=== From Tarball / Sources ===
  
-===== From Tarball / Sources ===== 
   * Open console update:   * Open console update:
  
 +<code>
  tar xvzf pandorafms_console_package.tar.gz  tar xvzf pandorafms_console_package.tar.gz
  cd pandora_console  cd pandora_console
  ./pandora_console_upgrade -p /yourconsolepath  ./pandora_console_upgrade -p /yourconsolepath
 +</code>
  
   * Enterprise console update:   * Enterprise console update:
  
 +<code>
  tar xvzf pandorafms_console_enterprise_package.tar.gz  tar xvzf pandorafms_console_enterprise_package.tar.gz
  cd pandora_console  cd pandora_console
  ./pandora_console_upgrade -p /yourconsolepath  ./pandora_console_upgrade -p /yourconsolepath
 +</code>
  
   * Open server update:   * Open server update:
  
 +<code>
  tar xvzf pandorafms_server_package.tar.gz   tar xvzf pandorafms_server_package.tar.gz 
  cd pandora_server  cd pandora_server
  ./pandora_server_upgrade --upgrade  ./pandora_server_upgrade --upgrade
 +</code>
  
   * Enterprise server update:   * Enterprise server update:
  
 +<code>
  tar xvzf pandorafms_server_enterprise_package.tar.gz   tar xvzf pandorafms_server_enterprise_package.tar.gz 
  cd pandora_server  cd pandora_server
  ./pandora_server_upgrade --upgrade  ./pandora_server_upgrade --upgrade
 +</code>
  
   * Agent update:   * Agent update:
  
 +<code>
  tar xvzf pandorafms_agent_package.tar.gz  tar xvzf pandorafms_agent_package.tar.gz
  cd pandora_agent  cd pandora_agent
  ./pandora_agent_installer --force-install  ./pandora_agent_installer --force-install
 +</code>
  
-===== Version 7.0NG ( Rolling Release ) ===== +=== Version 7.0NG ( Rolling Release ) === 
-If you choose to update manually the Pandora FMS Console in version 7.0NG, (through <code>rpm</code><code>tarball</code> or <code>deb</code>) you may have to manually apply the migration scripts between the different versions. To avoid this situation, in version 7 it is always recommended to update the console using **Update Manager**.+ 
 +If you choose to update manually the Pandora FMS Console in version 7.0NG, (through ''rpm''''tarball'' or ''deb'') you may have to manually apply the migration scripts between the different versions. To avoid this situation, in version 7 it is always recommended to update the console using **Update Manager**.
  
 In case of having an outdated database (a rare error that should not take place under normal circumstances), administrator users will see a warning on the notification tab indicating this problem: In case of having an outdated database (a rare error that should not take place under normal circumstances), administrator users will see a warning on the notification tab indicating this problem:
  
-<center> +{{ wiki:mr_message.png }}
-[[image:mr_message.png|center]] +
-</center>+
  
 To solve this problem, enter the server where the Pandora FMS console is installed and go to the directory: To solve this problem, enter the server where the Pandora FMS console is installed and go to the directory:
  
- /var/www/html/pandora_console/extras/mr. +  /var/www/html/pandora_console/extras/mr. 
  
-There should be another directory located within labeled as <code>updated</code>. All **sqls** that are already applied must be stored there, and those that are not must be stored outside. So once an **sql** is applied to the database, move them to the <code>updated</code> directory. +There should be another directory located within labeled as ''updated''. All **sqls** that are already applied must be stored there, and those that are not must be stored outside. So once an **sql** is applied to the database, move them to the ''updated'' directory. 
  
-<code>MR1</code> execution will serve as example. In this case, there is no **MR** applied on the database and the <code>MR0</code> will appear in the footer of the Pandora FMS console. Version 704 has been manually installed and the <code>MR1</code> must be applied executing the <code>sql</code> found at <code> /var/www/html/pandora_console/extras/mr/</code> called <code>1.sql</code>. Execute it like this:+''MR1'' execution will serve as example. In this case, there is no **MR** applied on the database and the ''MR0'' will appear in the footer of the Pandora FMS console. Version 704 has been manually installed and the ''MR1'' must be applied executing the ''sql'' found at '' /var/www/html/pandora_console/extras/mr/'' called ''1.sql''. Execute it like this:
  
- [[[email protected]|mr]]# cat 1.sql | mysql -u root -p pandora+  [[email protected] mr]# cat 1.sql | mysql -u root -p pandora
  
-The MySQL user is <code>root</code> and the database is labeled as <code>pandora</code>.+The MySQL user is ''root'' and the database is labeled as ''pandora''.
  
-Once applied, update the **MR** value in the <code>tconfig</code> table of MySQL to change the footer value to the current one. Execute the following command once entered MySQL:+Once applied, update the **MR** value in the ''tconfig'' table of MySQL to change the footer value to the current one. Execute the following command once entered MySQL:
  
 +<code>
  mysql> use pandora;  mysql> use pandora;
  mysql> update tconfig set value= XX where token='MR';  mysql> update tconfig set value= XX where token='MR';
 +</code>
  
-Once done, the warning message will disappear from the Console and in the footer, the <code>MR1</code> will appear as applied. The next step is to move the sql to the <code>updated</code> folder. +Once done, the warning message will disappear from the Console and in the footer, the ''MR1'' will appear as applied. The next step is to move the sql to the ''updated'' folder. 
  
- [[[email protected]|mr]]# mv 1.sql updated/+  [[email protected] mr]# mv 1.sql updated/
  
-To know which MRs should be applied, please go to the next [[Pandora:Documentation_en:Versions| link.]]+To know which MRs should be applied, please go to the next [[en:documentation:08_technical_reference:10_versions| link.]] 
 + 
 +==== Major release update ====
  
-====== Major release update ====== 
 Major release updates always include database changes, so **you need to update your database schema**, e. g. updates from version 6.0 to 6.1; or 6.1 to 7.0. Major release updates always include database changes, so **you need to update your database schema**, e. g. updates from version 6.0 to 6.1; or 6.1 to 7.0.
  
-===== Database updates ("Major releases" =====+=== Database updates ("Major releases") === 
 In order to update the database, first update the Open or Enterprise console, depending on your version. These updates allow the necessary **sql** files to be downloaded. In order to update the database, first update the Open or Enterprise console, depending on your version. These updates allow the necessary **sql** files to be downloaded.
  
-Once the console is up to date, the **sql** scripts of the database update  can be found in <code>/extras</code> or <code>/enterprise</code> (again, depending on your version) on the console. On a standard CentOS installation they can be found at:+Once the console is up to date, the **sql** scripts of the database update  can be found in ''/extras'' or ''/enterprise'' (again, depending on your version) on the console. On a standard CentOS installation they can be found at:
  
 +<code>
  /var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql  /var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql
  /var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql  /var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql
 +</code>
  
 Before updating, it is recommended to follow the precautions described above: back up the database and the config files, and suspend the Pandora FMS server: Before updating, it is recommended to follow the precautions described above: back up the database and the config files, and suspend the Pandora FMS server:
  
- service pandora_server stop+  service pandora_server stop
  
   * Open database update:   * Open database update:
  
- mysql -u username -p -D databasename+  mysql -u username -p -D databasename
  
 E. g.: E. g.:
  
- mysql -u pandora -p -D pandora +  mysql -u pandora -p -D pandora 
  
 Execute the following from MySQL command-line: Execute the following from MySQL command-line:
  
- source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;+  source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;
  
-{{Tip|When executing the Open version migration, the Enterprise version will also be updated.}}+<WRAP center round tip 60%> 
 +When executing the Open version migration, the Enterprise version will also be updated. 
 +</WRAP>
  
-To exit the MySQL client, execute <code>quit</code>. The database is now updated to the correct version.+To exit the MySQL client, execute ''quit''. The database is now updated to the correct version.
  
 In case you need to go back to a previous version, you can restore the backed up database by means of this procedure: In case you need to go back to a previous version, you can restore the backed up database by means of this procedure:
  
 +<code>
  mysql -u username -p databasename  mysql -u username -p databasename
  > drop database databasename;  > drop database databasename;
Line 198: Line 225:
  > use newdatabasename;  > use newdatabasename;
  > source backup_pandora_X.Y.sql  > source backup_pandora_X.Y.sql
 +</code>
  
 E. g.: E. g.:
  
 +<code>
  mysql -u root -p pandora  mysql -u root -p pandora
  > drop database pandora;  > drop database pandora;
Line 206: Line 235:
  > use pandora;  > use pandora;
  > source backup_pandora_X.Y.sql;  > source backup_pandora_X.Y.sql;
 +</code>
  
-= Automatic update with Update Manager =+===== Automatic update with Update Manager ===== 
 + 
 +==== OpenSource updates ====
  
-====== OpenSource updates ====== 
 From version 4.0.2 onwards, Pandora FMS (Opensource version) allows semi-automatic weekly updates, based on improvements in the **Update Manager** system (previously exclusive to Enterprise).  It allows an online query to be carried out, to find out if there is an update available and, if so, download it and automatically update the console. From version 4.0.2 onwards, Pandora FMS (Opensource version) allows semi-automatic weekly updates, based on improvements in the **Update Manager** system (previously exclusive to Enterprise).  It allows an online query to be carried out, to find out if there is an update available and, if so, download it and automatically update the console.
  
Line 221: Line 252:
   * Updates are **only** for the console, not for agents or server.   * Updates are **only** for the console, not for agents or server.
  
-===== Console update process ===== +=== Console update process === 
-It is fairly simple. Go to **Update manager** -> **Update manager online**. On the main screen you will see if there are any pending or available updates, plus the latest console version.+ 
 +It is fairly simple. Go to **Update manager** → **Update manager online**. On the main screen you will see if there are any pending or available updates, plus the latest console version.
  
-{{ wiki:Um_online_open_actualizar_es.png ?500}}+{{  :wiki:um_online_open_actualizar_es.png  }}
  
 If there is any update, click **Ok** to install it. After downloading the package, a dialog will appear with the option to accept or reject the update. If there is any update, click **Ok** to install it. After downloading the package, a dialog will appear with the option to accept or reject the update.
  
-{{ wiki:Dialog_um_principal_es.png ?500}}+{{  :wiki:dialog_um_principal_es.png  }}
  
 Click **Ok** to begin the installation process. Click **Ok** to begin the installation process.
Line 234: Line 266:
 Some updates contain database modifications. The update process launches a dialog to inform about these changes, as in the following screenshot: Some updates contain database modifications. The update process launches a dialog to inform about these changes, as in the following screenshot:
  
-{{ wiki:Dialog_hay_mr_es.jpg ?500}}+{{  :wiki:dialog_hay_mr_en.png  }}
  
 At this point there are two possibilities, either applying the changes to the database and updating the console, or rejecting the update, so that nor the database nor the console are updated, since some changes in the console need the according changes in the database. At this point there are two possibilities, either applying the changes to the database and updating the console, or rejecting the update, so that nor the database nor the console are updated, since some changes in the console need the according changes in the database.
  
-{{tip|To use Update Manager, you need an outgoing Internet connection. It uses WGET by default to download packets, you can use the CURL method (this must be changed in the Pandora FMS configuration) but it is slower.}}+<WRAP center round tip 60%> To use Update Manager, you need an outgoing Internet connection. It uses WGET by default to download packets, you can use the CURL method (this must be changed in the Pandora FMS configuration) but it is slower. </WRAP>
  
 After the process, the main update page will appear with the updated console version displayed. Congratulations, you have successfully updated your version! After the process, the main update page will appear with the updated console version displayed. Congratulations, you have successfully updated your version!
  
-{{ wiki:Um_online_open_finalizado.png ?300}}+{{  :wiki:um_online_open_finalizado.png  }} 
 + 
 + 
 +==== Enterprise updates ====
  
-====== Enterprise updates ====== 
 Unlike Open updates, these have some additional characteristics: Unlike Open updates, these have some additional characteristics:
  
Line 253: Line 287:
   * It allows offline updates, downloading packages from the support page, for Pandora FMS installations that do not have an Internet connection (for security reasons).   * It allows offline updates, downloading packages from the support page, for Pandora FMS installations that do not have an Internet connection (for security reasons).
  
-===== Configuration ===== +=== Configuration === 
-{{ wiki:icono-modulo-enterprise.png|Enterprise version.}}+ 
 +{{wiki:icono-modulo-enterprise.png }}
  
 To be able to use **Update Manager** in the Enterprise version, first the updater must be correctly configured, which has its own section in the menu: To be able to use **Update Manager** in the Enterprise version, first the updater must be correctly configured, which has its own section in the menu:
  
-{{ wiki:Opciones_um_es.png ?700}}+{{ wiki:Opciones_um_es.png?700 }}
  
-===== Online updates ===== +=== Online updates ===
-Update Manager is available in the **Update Manager**. If you have the Enterprise version installed, you may use this interface, otherwise the one to appear will be that of the Open version.+
  
-{{ wiki:Um_online_pag_principal_es.png ?750}}+Update Manager is available in the **Update Manager**. If you have the Enterprise version installed, you may use this interface, otherwise the one to appear will be that of the Open version.
  
 From this page, you can see the current version of Pandora FMS, plus any new updates available. From this page, you can see the current version of Pandora FMS, plus any new updates available.
Line 271: Line 305:
 A dialog will appear giving the option to continue or not. A dialog will appear giving the option to continue or not.
  
-{{ wiki:Dialog_um_principal_es.png ?500}}+{{  :wiki:dialog_um_principal_es.png?500  }}
  
 If you click Continue, two things can happen: either the console will be updated and the process will finish; or, the update may include database changes and a dialog will appear asking whether you want to update the database or not. If you click Continue, two things can happen: either the console will be updated and the process will finish; or, the update may include database changes and a dialog will appear asking whether you want to update the database or not.
- 
-{{ wiki:Dialog_hay_mr_es.jpg ?500}} 
  
 If you decide to update it, the process will continue in a normal way, but if you reject it, neither the database nor the console will be updated, since some changes in the database can have critical importance in changes to the console in that same update. If you decide to update it, the process will continue in a normal way, but if you reject it, neither the database nor the console will be updated, since some changes in the database can have critical importance in changes to the console in that same update.
Line 281: Line 313:
 After, the updater will appear with the current version installed on Pandora FMS. After, the updater will appear with the current version installed on Pandora FMS.
  
-===== Offline updates ===== + 
-Offline Pandora FMS updates can also be downloaded, which have <code>.OUM</code> extensions. Go to the official Pandora FMS support page to download them.+=== Offline updates === 
 + 
 +Offline Pandora FMS updates can also be downloaded, which have ''.OUM'' extensions. Go to the official Pandora FMS support page to download them.
  
 Upload them to the console with the following control: Upload them to the console with the following control:
  
-{{ wiki:Um_offline_pag_principal_es.png ?700}}+{{  :wiki:um_offline_pag_principal_es.png  }}
  
 Once uploaded, the file will appear. We can click on it to start the update. Once uploaded, the file will appear. We can click on it to start the update.
  
-{{ wiki:Um_offline_pag_principal_cargado_es.png ?560}}+{{  :wiki:um_offline_pag_principal_cargado_es.png  }}
  
-The update follows the same operation flow as online downloads, displaying the corresponding console and database update dialogs, if there are any changes to be applied there. +The update follows the same operation flow as online downloads, displaying the corresponding console and database update dialogs, if there are any changes to be applied there.
  
-{{tip|The Pandora FMS Console can be updated in the same way as with the OUMs, using zip files created by our team.}}+<WRAP center round tip 60%> The Pandora FMS Console can be updated in the same way as with the OUMs, using zip files created by our team. </WRAP>
  
-{{Warning|In case of updating an installation with High Availability (HA), it will be necessary to take into account what is indicated in [[Pandora:Documentation_en:HA#Update|this section]].}}+<WRAP center round important 60%> In case of updating an installation with High Availability (HA), it will be necessary to take into account what is indicated in [[:en:documentation:05_big_environments:06_ha#update|this section]]. </WRAP>
  
-====== Additional PHP engine configuration for Update Manager ====== 
-For Open Update Manager to run correctly, it needs more memory than the default memory it takes. To assign more memory to the PHP run, and make the Open Update Manager work, you must edit the php. ini file and set the memory to at least 256M. 
  
-The line is: +==== Additional PHP engine configuration for Update Manager ====
  
- memory_limit = 256M ; Maximum amount of memory a script may consume (16MB)+For Open Update Manager to run correctly, it needs more memory than the default memory it takes. To assign more memory to the PHP run, and make the Open Update Manager work, you must edit the php. ini file and set the memory to at least 800M.
  
-To find out the location of the file <code>php.ini</code> execute:+The line is:
  
- php -i | grep php.ini+<code> 
 +memory_limit = 800M    ; Maximum amount of memory a script may consume
  
-Also, depending on Pandora FMS version you have installed, you may get the information to update to version PHP 7 [[Pandora:Documentation_en:_PHP_7|here]].<br><br><br>+</code>
  
-= Migrating to another system=+To find out the location of the file ''php.ini'' execute: 
 +<code> 
 +php -i | grep php.ini
  
-You may want to use a new version of Pandora FMS in another different or newer system or distribution, for example, migrating from a CentOS 6 to 8 or from RHEL to CentOS.+</code> 
 + 
 +Also, depending on Pandora FMS version you have installed, you may get the information to update to version PHP 7 [[:en:documentation:07_technical_annexes:14_php_7|here]]. 
 + 
 + 
 +===== Migrating to another system ===== 
 + 
 +You may want to use a new Pandora FMS version in another different or newer system or distribution, for example, migrating from a CentOS 6 to 8 or from RHEL to CentOS.
  
 1. Back up the previous system's database: 1. Back up the previous system's database:
  
- mysqldump -u root -p pandora > backup_pandora_X.Y.sql+<code> 
 +mysqldump -u root -p pandora> backup_pandora_X.Y.sql 
 + 
 +</code>
  
 2. Install the new Pandora FMS system from scratch, or [[https://pandorafms.com/community/get-started/|download]] it directly from Pandora FMS ISO and install it. 2. Install the new Pandora FMS system from scratch, or [[https://pandorafms.com/community/get-started/|download]] it directly from Pandora FMS ISO and install it.
  
-3. Then, send or copy the <code>backup_pandora_X.Y.sql</code> file from the old system to the new one.+3. Then, send or copy the ''backup_pandora_X.Y.sql'' file from the old system to the new one.
  
 4. Close all running processes except for MySQL. Start by Pandora FMS: 4. Close all running processes except for MySQL. Start by Pandora FMS:
- /etc/init.d/pandora_server stop  +<code> 
- /etc/init.d/pandora_agent_daemon stop  + 
- /etc/init.d/tentacle_serverd stop + /etc/init.d/pandora_server stop 
 + /etc/init.d/pandora_agent_daemon stop 
 + /etc/init.d/tentacle_serverd stop 
 + 
 +</code> 
 + 
 +<WRAP center round tip 60%>\\ 
 +From version NG 754 onwards, [[:en:documentation:05_big_environments:07_server_management#manual_startupshutdown_for_pandora_fms_servers|additional options are available for manual startup and shutdown]] of High Availability (HA) environments.\\ 
 +</WRAP>\\ 
 +5. Stopping the Apache server will depend on the distribution used: 
 +<code> 
 + 
 +/etc/init.d/apache2 stop
  
-5. Stopping the Apache server will depende on the distribution used:+</code>
  
- /etc/init.d/apache2 stop+<code> 
 +/etc/init.d/httpd stop
  
- /etc/init.d/httpd stop+</code>
  
- systemctl stop httpd.service+<code> 
 +systemctl stop httpd.service
  
-6. Enter **MySQL** as root user. Access the Pandora FMS database on the new system (¨pandora¨ by default) and import the database.+</code>
  
 +6. Enter **MySQL** as root user. Access Pandora FMS database on the new system (¨pandora¨ by default) and import the database.
 +<code>
  # mysql -u root -p  # mysql -u root -p
  mysql>use pandora  mysql>use pandora
  Database changed  Database changed
- mysql>source /home/<your_user>/backup_pandora_X.Y.sql + mysql>source /home/<your_user>/backup_pandora_X.Y.sql
  
-This path will vary depending on the directory where the backup is stored.+</code>
  
-7. In case of a migration to a higher version, where the database structure changes, this would be the time to run the migration scripts as indicated in the major version update procedure. +This path will vary depending on the directory where the backup is stored.
- +
-8. If you have changed the distribution, keep in mind the console <code>PATH</code> has also changed and some database fields will be different, such as **tconfig** <code>attachment_store</code> and <code>fontpath</code>. To modify these fields, enter these queries. In the example you can see what a migration to CentOS would look like. For other distributions, change the Apache directory <code>path</code>.+
  
 +7. In case of migrating to a higher version, where the database structure changes, this would be the time to run the migration scripts as indicated in the major version update procedure.
  
 +8. If you changed the distribution, keep in mind the console ''PATH'' also changed and some database fields will be different, such as **tconfig** ''attachment_store'' and ''fontpath''. To modify these fields, enter these queries. In the example you can see what a migration to CentOS would look like. For other distributions, change the Apache directory ''path''.
 +<code>
  #mysql -u root -p  #mysql -u root -p
  mysql>use pandora  mysql>use pandora
Line 356: Line 418:
  mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath'  mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath'
  
-Keep these <code>PATHS</code> in mind in server and console configuration files (<code>config.php</code> and <code>pandora_server.conf</code>+</code> 
-  + 
-9. Once the database is migrated, check that the previous  <code>.../pandora_console/include/config.php</code> and <code>/etc/pandora/pandora_server.conf</code> files and the new ones contain the same data in the <code>dbname</code><code>dbuser</code> and <code>dbpass</code> fields. If they are the same ther is no need to do anything. If not, do one of these two things:+Keep these ''PATHS'' in mind in server and console configuration files (''config.php'' and ''pandora_server.conf''
 + 
 +9. Once the database is migrated, check that the previous ''/pandora_console/include/config.php'' and ''/etc/pandora/pandora_server.conf'' files and the new ones contain the same data in the ''dbname''''dbuser'' and ''dbpass'' fields. If they are the same there is no need to do anything. If not, do one of these two things:
  
 a. Replace the new files with the old ones or replace the data of the new files for the old ones. a. Replace the new files with the old ones or replace the data of the new files for the old ones.
Line 364: Line 428:
 b. Give the database permissions with the data from the new installation. E. g. with the following data; dbname=pandora, dbuser=pandora1 and dbpass=pandora2, it would be like this: b. Give the database permissions with the data from the new installation. E. g. with the following data; dbname=pandora, dbuser=pandora1 and dbpass=pandora2, it would be like this:
  
 +<code>
  #mysql -u root -p  #mysql -u root -p
  mysql>grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2';  mysql>grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2';
  mysql>flush privileges;  mysql>flush privileges;
 +
 +</code>
  
 Restart the daemons and access Pandora FMS console, including all agents, modules, alerts, etc. already configured and, if you replace the IP of the new host by the previous one, all the local agents will report to the new system. Restart the daemons and access Pandora FMS console, including all agents, modules, alerts, etc. already configured and, if you replace the IP of the new host by the previous one, all the local agents will report to the new system.
Line 372: Line 439:
 If it is the Enterprise version, follow the same procedure. If it is the Enterprise version, follow the same procedure.
  
-= Update to a previous version  =+ 
 +===== Update to a previous version =====
  
 To be able to update your software to a previous version, downgrade Pandora FMS console. As a precaution, it is recommended to back up the database and Pandora FMS configuration file as shown previously. The Open package must always be installed first and the Enterprise version afterwards. To be able to update your software to a previous version, downgrade Pandora FMS console. As a precaution, it is recommended to back up the database and Pandora FMS configuration file as shown previously. The Open package must always be installed first and the Enterprise version afterwards.
  
-======From RPM packages======+==== From RPM packages ==== 
   * Open console update:   * Open console update:
- rpm -i --force pandorafms_console_package.rpm+ 
 +  rpm -i --force pandorafms_console_package.rpm 
   * Enterprise console update:   * Enterprise console update:
- rpm -i --force pandorafms_console__enterprise_package.rpm 
  
-======From Tarball/Sources======+  rpm -i --force pandorafms_console__enterprise_package.rpm 
 + 
 +==== From Tarball/Sources ==== 
   * Open console update:   * Open console update:
 +<code>
  tar -xvzf pandorafms_console_package.tar.gz  tar -xvzf pandorafms_console_package.tar.gz
  mv –f ./pandora_console/* /yourconsolepath  mv –f ./pandora_console/* /yourconsolepath
 +</code>
  
   * Enterprise console update:   * Enterprise console update:
 +<code>
  tar -xvzf pandorafms_console_package.tar.gz  tar -xvzf pandorafms_console_package.tar.gz
  mv -f ./enterprise /yourconsolepath  mv -f ./enterprise /yourconsolepath
 +</code>
ºº