Cacti (home)ForumsDocumentation

Differences

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

manual:088:1_installation.3_upgrading [2012/05/12 05:41]
127.0.0.1 external edit
manual:088:1_installation.3_upgrading [2014/11/07 19:48] (current)
BSOD2600 Windows cmd updates
Line 1: Line 1:
  
 ===== Upgrading Cacti ===== ===== Upgrading Cacti =====
 +
 +==== Linux ====
  
   - Backup the old Cacti database.<code>   - Backup the old Cacti database.<code>
 shell> mysqldump -l --add-drop-table cacti > mysql.cacti shell> mysqldump -l --add-drop-table cacti > mysql.cacti
-</code><file> +</code> 
-Note: You will probably have to specify the -u and -p flags for the MySQL username and password.  +<note>You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.</note
-This user must have permission to read from Cacti's database or you will end up with an empty backup. +  - Backup the old Cacti directory.<code> 
-</file+Unix shell> mv cacti cacti_old 
-  - Backup the old Cacti directory.<code>shell> mv cacti cacti_old</code> +</code> 
-  - Extract the distribution tarball.<code>shell> tar xzvf cacti-version.tar.gz</code> +  - Extract the distribution tarball.<code> 
-  - Rename the new Cacti directory to match the old one.<code>shell> mv cacti-version cacti</code>+Unix shell> tar xzvf cacti-version.tar.gz 
 +</code> 
 +  - Rename the new Cacti directory to match the old one.<code> 
 +Unix shell> mv cacti-version cacti 
 +</code>
   - Edit "include/config.php" and specify the database type, name, host, user and password for your Cacti configuration.<code>$database_type = "mysql";   - Edit "include/config.php" and specify the database type, name, host, user and password for your Cacti configuration.<code>$database_type = "mysql";
 $database_default = "cacti"; $database_default = "cacti";
Line 30: Line 36:
 </code>The $plugins array is required for using the [[http://cactiusers.org|Plugin Architecture (PIA)]] only. For legacy plugins, those that must be installed in global.php, we have moved the plugins array out of global.php and into config.php. This was done to insure that global.php remains pristine. It is a file that is not intended to be modified, so with the PIA installed, you should not have to.\\ The variable "URL_PATH" has also been moved from global.php to config.php for the same reason as the plugins array. For those of you upgrading from very old Plugin Architectures you should know that in the past, we attempted to "detect" this path. However, the process was not reliable. Therefore, you have to specify that path in config.php. </code>The $plugins array is required for using the [[http://cactiusers.org|Plugin Architecture (PIA)]] only. For legacy plugins, those that must be installed in global.php, we have moved the plugins array out of global.php and into config.php. This was done to insure that global.php remains pristine. It is a file that is not intended to be modified, so with the PIA installed, you should not have to.\\ The variable "URL_PATH" has also been moved from global.php to config.php for the same reason as the plugins array. For those of you upgrading from very old Plugin Architectures you should know that in the past, we attempted to "detect" this path. However, the process was not reliable. Therefore, you have to specify that path in config.php.
   - Copy the *.rrd files from the old Cacti directory.<code>   - Copy the *.rrd files from the old Cacti directory.<code>
-shell> cp cacti_old/rra/* cacti/rra/</code>+Unix shell> cp cacti_old/rra/* cacti/rra/ 
 +</code>
   - Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over write if the scripts either don't exist or are newer than the distribution's.<code>   - Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over write if the scripts either don't exist or are newer than the distribution's.<code>
-shell> cp -u cacti_old/scripts/* cacti/scripts/</code>+Unix shell> cp -u cacti_old/scripts/* cacti/scripts/ 
 +</code>
   - Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.<code>   - Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.<code>
-shell> cp -u -R cacti_old/resource/* cacti/resource/</code>+Unix shell> cp -u -R cacti_old/resource/* cacti/resource/ 
 +</code>
   - Set the appropriate permissions on Cacti's directories for graph/log generation. You should execute these commands from inside Cacti's directory to change the permissions.<code>   - Set the appropriate permissions on Cacti's directories for graph/log generation. You should execute these commands from inside Cacti's directory to change the permissions.<code>
-shell> chown -R cactiuser rra/ log/</code>(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.) +Unix shell> chown -R cactiuser rra/ log/</code>(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.) 
-  - [[1_installation.1_install_unix.7_apply_patches|Apply Patches]]+ 
 +==== Windows ====  
 +  - Backup the old Cacti database.<code> 
 +C:\> mysqldump -l --add-drop-table cacti > mysql.cacti 
 +</code> 
 +<note>You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.</note> 
 +  - Backup the old Cacti directory.<code> 
 +C:\> XCOPY /S cacti cacti_old  
 +</code> 
 +  - Extract the distribution zip file using your favorite unzipping tool. 
 +  - Rename the new Cacti directory to match the old one. 
 +  - Overwrite the existing Cacti directories and files with the new distribution. <code> 
 +C:\> MOVE cacti-version cacti 
 +</code> 
 +  - Edit "include/config.php" and specify the database name, host, user and password for your Cacti configuration. 
 +  - Copy the *.rrd files from the old Cacti directory.<code> 
 +C:\> XCOPY \cacti_old\rra\*.rrd \cacti\rra\ 
 +</code> 
 +  - Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over write if the scripts either don't exist or are newer than the distribution's.<code> 
 +C:\> xcopy /D /S \cacti_old\scripts\* \cacti\scripts\ 
 +</code> 
 +  - Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.<code> 
 +C:\>  xcopy /D /S \cacti_old\resource\* \cacti\resource\ 
 +</code> 
 +  - Apply patches for [[1_installation.2_install_windows.9_apply_patches|Windows]] 
 +  - Follow the Windows [[http://docs.cacti.net/manual:088:1_installation.2_install_windows.10_configure_security|security guidelines]]
   - Point your web browser to:<code>   - Point your web browser to:<code>
 http://your-server/cacti/</code> http://your-server/cacti/</code>
   - Follow the on-screen instructions so your database can be updated to the new version.   - Follow the on-screen instructions so your database can be updated to the new version.
- 





Personal Tools