This is the third step for installing and configuring Nagios and Cacti. It is to patch and install the weathermap plug-in for cacti and build the weathermap plug-in on the previous experiment platform. This article mainly introduces the first part of this article: the package cacti-plugin-0.8.7h-pa-v3.0.tar.gz for installing plug-ins. [root @ localhost ~] # Tarzxvfcacti-
This is the third step for installing and configuring Nagios and Cacti. It is to patch and install weathe for cacti.RmThe ap plug-in is built on the previous experimental platform. This article mainly introduces
Part 1:
InstallationCatI-plugin Solution
Required kit cacti-plugin-0.8.7h-PA-v3.0.tar.gz
[Root @ localhost ~] # Tar zxvf cacti-plugin-0.8.7h-PA-v3.0.tar.gz
[Root @ localhost ~] #CdCacti-plugin-arch/
[Root @ localhost cacti-plugin-arch] #Cp-RfFileS/*/var/www/cacti/
[Root @ localhost cacti-plugin-arch] # cd/var/www/cacti/
[Root @ localhost cacti] # mysql-u root cacti <~ /Cacti-plugin-arch/pa. SQL
[Root @ localhost cacti] # cd INcLude/
[Root @ localhost include] # vi global.Php// Modify the following fields.
$ Database_username = "cactiuser ";
$ Database_password = "721 wyzj ";
If (! IsSet($ Url_path )){
$ Url_path = "/cacti /";
}
Then log on to http: // 192.168.1.192/cacti/indEx. Php User Management --> admin --> Plugin Management (add this one)
Experiment Summary
We have been using the following patch steps
Patch-P1-N <cacti-plugin-0.8.7g-PA-v2.8.Diff
Then modify vi/var/www/cacti/include/global. php.
$ Database_username = "cactiuser ";
$ Database_password = "721 wyzj ";
$ Config ['url _ path'] = '/cacti /';
However, the Call to undefin always appears during login.EdFunction api_plugin_hook () error message, Google has a lot of solutions, it does not work, and later found that the unlockCompressionThere is a file directory under the directory where the package is located, and we can find out by searching through the network. There is another solution-overwrite, so we try to do the above success stories, finally, the problem is solved. Take a deep breath!
Part 2: weathermap plug-in Installation
[Root @ localhost ~] # Ll php-weathermap-0.97a.Zip
-Rw-r -- 1 root 2927302 Oct 16 2011 php-weathermap-0.97a.zip
[Root @ localhost ~] #UnzipPhp-weathermap-0.97a.zip
[Root @ localhost ~] #MvWeathermap // var/www/cacti/plugins
[Root @ localhost ~] # Cd/var/www/cacti/plugins/weathermap/
[Root @ localhost weathermap] #Chown-R cactiuser output/
[Root @ localhost weathermap] # chown-R apache configs/
[Root @ localhost weathermap] #Chmod-R u + w configs/
[Root @ localhost weathermap] # cp editor-config.php-dist editor-config.php
[Root @ localhost weathermap] # vi editor-config.php
$ Cacti_base = "/var/www/cacti ";
$ Cacti_url = "http: // 192.168.1.192/cacti /";
$ Mapdir = $ cacti_base. '/plugins/weathermap/configs ';
[Root @ localhost weathermap] # vi editor. php // from faLsE. Change to true.
$ ENABLED = ture;
In this way, the configuration is successful, followed by web operations. In order to install the software for a long time, the final solution is to modify global. the url_path in php is/cacti/, which does not need to be modified before. I did not expect it to be used in the plug-in. This is not surprising!