王学昌的笔记

Orioner.Wang

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size
学习笔记 nix-Server Cacti 0.7.8e安装插件扩展出现错误

Cacti 0.7.8e安装插件扩展出现错误

Cacti 0.7.8e安装插件扩展出现问题
 
步骤二、unzip cacti-plugin-0.8.7e-PA-v2.6.zip 
                会得到cacti-plugin-arch目录。这里面有cacti-plugin-0.8.7e-PA-v2.6.diff和pa.sql。这两个文件是我们最需要的。
步骤三、导入数据库文件
                mysql -uroot cacti <cacti-plugin-arch/pa.sql
                给cacti打补丁
                patch -p1 -N <../cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff
 
提示信息为(有几个错误的):
patching file auth_changepassword.php
patching file auth_login.php
Hunk #2 succeeded at 266 (offset 2 lines).
Hunk #3 succeeded at 329 with fuzz 1 (offset 2 lines).
patching file data_sources.php
Hunk #1 succeeded at 44 with fuzz 1.
Hunk #3 succeeded at 533 (offset -5 lines).
Hunk #4 succeeded at 680 (offset -5 lines).
Hunk #5 succeeded at 974 (offset -5 lines).
Hunk #6 FAILED at 1308.
Hunk #7 succeeded at 1337 (offset -5 lines).
1 out of 7 hunks FAILED -- saving rejects to file data_sources.php.rej
patching file graph_image.php
patching file graph.php
Hunk #1 FAILED at 100.
Hunk #2 FAILED at 215.
Hunk #3 FAILED at 248.
3 out of 3 hunks FAILED -- saving rejects to file graph.php.rej
patching file graphs_new.php
Hunk #1 FAILED at 479.
1 out of 1 hunk FAILED -- saving rejects to file graphs_new.php.rej
patching file graphs.php
Hunk #1 succeeded at 45 with fuzz 1.
Hunk #3 succeeded at 500 (offset -6 lines).
patching file host.php
Hunk #1 succeeded at 44 with fuzz 1.
Hunk #3 succeeded at 446 (offset -3 lines).
Hunk #4 succeeded at 539 with fuzz 1 (offset -3 lines).
Hunk #5 FAILED at 651.
Hunk #6 succeeded at 1113 (offset -3 lines).
1 out of 6 hunks FAILED -- saving rejects to file host.php.rej
patching file include/auth.php
Hunk #2 FAILED at 78.
Hunk #3 FAILED at 86.
Hunk #4 FAILED at 94.
3 out of 4 hunks FAILED -- saving rejects to file include/auth.php.rej
patching file include/bottom_footer.php
patching file include/global_arrays.php
Hunk #1 succeeded at 22 with fuzz 1.
Hunk #2 succeeded at 645 with fuzz 1 (offset -2 lines).
patching file include/global_constants.php
Hunk #1 succeeded at 173 (offset -2 lines).
patching file include/global_form.php
Hunk #2 succeeded at 1175 (offset -10 lines).
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
Hunk #2 FAILED at 55.
Hunk #3 succeeded at 109 (offset 1 line).
Hunk #4 FAILED at 121.
Hunk #5 succeeded at 129 (offset 1 line).
Hunk #6 succeeded at 157 (offset 1 line).
2 out of 6 hunks FAILED -- saving rejects to file include/top_graph_header.php.rej
patching file include/top_header.php
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 79.
Hunk #3 succeeded at 88 (offset 1 line).
Hunk #4 succeeded at 101 (offset 1 line).
2 out of 4 hunks FAILED -- saving rejects to file include/top_header.php.rej
patching file index.php
Hunk #2 succeeded at 47 (offset -1 lines).
patching file lib/api_device.php
patching file lib/auth.php
patching file lib/functions.php
Hunk #2 FAILED at 1652.
Hunk #3 succeeded at 1731 with fuzz 1.
1 out of 3 hunks FAILED -- saving rejects to file lib/functions.php.rej
patching file lib/html_form.php
Hunk #1 FAILED at 722.
Hunk #3 FAILED at 760.
2 out of 3 hunks FAILED -- saving rejects to file lib/html_form.php.rej
patching file lib/html.php
Hunk #2 FAILED at 143.
Hunk #4 FAILED at 269.
Hunk #8 FAILED at 769.
3 out of 8 hunks FAILED -- saving rejects to file lib/html.php.rej
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
Hunk #1 succeeded at 564 (offset 7 lines).
Hunk #2 succeeded at 1421 (offset 29 lines).
Hunk #3 succeeded at 1436 (offset 29 lines).
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
patching file user_admin.php
Hunk #4 FAILED at 915.
Hunk #5 succeeded at 943 with fuzz 2.
1 out of 6 hunks FAILED -- saving rejects to file user_admin.php.rej
patching file utilities.php
Hunk #2 succeeded at 1648 (offset 3 lines).
完成以上三个步骤后,尝试访问Cacti则出现错误
提示如下:Parse error: syntax error, unexpected '}' in /var/www/cacti/include/top_header.php on line 94
估计是文件出错了,那还是覆盖掉算了
sudo rsync -avz ../cacti-plugin-arch/files-0.8.7e/* .
但这么操作后,访问还是出了问题
如下:cactipaerr
 
修改一下global.php
      vi include/global.php
      $config['url_path'] = '/cacti/';
 
搞定。
学习笔记 nix-Server Cacti 0.7.8e安装插件扩展出现错误
内容的浏览数 : 276303